Following quiz provides Multiple Choice Questions (MCQs) related to Java . You will have to read all the given answers and click over the correct answer. If you are not sure about the answer then you can check the answer using Show Answer button. You can use Next Quiz button to check new set of questions in the quiz.
Q 1 - Which among the following is not a primitive data type in java? |
|
Show Answer |
Answer is : Option A |
Q 2 - Keywords used for inheritance in java? |
|
Show Answer |
Answer is : Option D |
Q 3 - String text = "Hello World"; How to change text to lower case? |
|
Show Answer |
Answer is : Option C |
Q 4 - When a new object is initialized it is stored in which part of the heap? |
|
Show Answer |
Answer is : Option B |
Q 5 - int i = 0; while (i < 5) { system.out.println("Hello"); } What will be the output of the above code snippet? |
|
Show Answer |
Answer is : Option C |
Q 6 - public static void main(String args[]) { int x; x = 1; { int y = 2; } System.out.println(x "+" y); } What will be the output of the code snippet? |
|
Show Answer |
Answer is : Option D |
Q 7 - IF (20 > 18) { system.out.println("20 is greater than 18"); } ELSE { system.out.println("20 is lesser than 18"); } The above code snippet throws an error in java why? |
|
Show Answer |
Answer is : Option B |
Q 8 - Run time polymorphism is also called? |
|
Show Answer |
Answer is : Option A |
Q 9 - Which of the following doesn't falls under the category of identifiers? |
|
Show Answer |
Answer is : Option A |
Q 10 - Modulo operator (%) can be applied over ___________ data type? |
|
Show Answer |
Answer is : Option C |