Below is what is seen by many as the hardest trivia questions java programming test. It is not designed for beginners when it comes to this course but for the professionals who think they understand this programming language and how to use it. How about you give it a shot and get to see if you are a novice or an accrual pro when it comes to all things java.
A b
A followed by an exception
Compilation fails.
A ClassCastException is thrown at runtime.
Rate this question:
Sum is 600
Compilation fails at line n1.
Compilation fails at line n2.
A exception is thrown at line n1.
A exception is thrown at line n2.
Rate this question:
Compilation fails at line n1.
Compilation fails at line n2.
A exception is thrown at line n1.
A exception is thrown at line n2.
Rate this question:
Replace line 10 with c = (double) a;
Replace line 8 with b = (float) a;
Replace line 7 with a = (int) b;
Replace line 9 with c = (double) b;
Rate this question:
A b
A followed by an exception
Compilation fails
A ClassCastException is thrown at runtime.
Rate this question:
Quiz Review Timeline +
Our quizzes are rigorously reviewed, monitored and continuously updated by our expert board to maintain accuracy, relevance, and timeliness.
Wait!
Here's an interesting quiz for you.