Are you a real programmer? Get ready to take the hardest Java exam trivia quiz that we have brought here for you. The quiz is on Java, and it is going to be very tough. If you know Java very well, only then will you be able to pass this test with a good score? Do you have the confidence? See moreLet's see how well you perform in this amazing quiz.
Compiles and prints show()
Compiles and prints Display() show()
Compiles but throws runtime exception
Compilation error
Rate this question:
Compilation error
Comiples and prints From A
Compiles but throws runtime exception
Compiles and display 3
Rate this question:
Compiles successfully but runtime error
Var 1=1 var 2=0
Compile error
Var 1=0 var 2=0
Rate this question:
Compile error
Man Dog Cat Ant
Dog Man Cat Ant
Cat Ant Dog Man
Rate this question:
Unresolved compilation problem: The local variable i1 may not have been initialized
Compilation and output of null
Compiled and output of 0
None of the given options
Rate this question:
Compilation error
Runtime Exception
2500
50
Rate this question:
Prints Hi Hello
Compiler Error
Runs but no output
Runtime Error
Rate this question:
Result = stringA.concat( stringB.concat( stringC ) );
Result.concat( stringA, stringB, stringC );
Result+stringA+stringB+stringC;
Result = concat(StringA).concat(StringB).concat(StringC)
Rate this question:
Protected, interface
Final, interface
Public, friend
Final, protected
Private, abstract
Rate this question:
A Sequence of 5 zero's will be printed like 0 0 0 0 0
A Sequence of 5 one's will be printed like 1 1 1 1 1
IndexOutOfBoundes Error
Compilation Error occurs and to avoid them we need to declare Mine class as abstract
Rate this question:
Compile time error referring to a cast problem
A random number between 1 and 10
A random number between 0 and 1
A compile time error as random being an undefined method
Rate this question:
Boolean b = TRUE;
Byte b = 256;
String s = “null”;
Int i = new Integer(“56”);
Rate this question:
Constructor of A executes first, followed by the constructor of B and C
Constructor of C executes first followed by the constructor of A and B
Constructor of C executes first followed by the constructor of B and A
Constructor of A executes first followed by the constructor of C and B
Rate this question:
100
100 200
200
Compile time error
Rate this question:
Compiler Error: anar is referenced before it is initialized
2
1
Compiler Error: size of array must be defined
Rate this question:
I = this.planets;
I = this.suns;
This = new ThisUsage();
This.i = 4;
This.suns = planets;
Rate this question:
Error: amethod parameter does not match variable
10 and 40
10, and 20
20 and 40
Rate this question:
Hellow
It is not possible to declare a constructor as private
Compilation Error
Runs without any output
Rate this question:
The returnValue can be any type, but will be automatically converted to returnType when the method returns to the caller
If the returnType is void then the returnValue can be any type
The returnValue must be the same type as the returnType, or be of a type that can be converted to returnType without loss of information
The returnValue must be exactly the same type as the returnType.
Rate this question:
Quiz Review Timeline (Updated): Jul 3, 2023 +
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.