Question 1 of 25
Hints left: 3
Q1
What is the default value of a local variable in Java if it is not explicitly initialized?
Q2
Which data structure in Java is based on the Last-In-First-Out (LIFO) principle?
Q3
What does the `volatile` keyword in Java do?
Q4
In Java, what is the purpose of the `compareTo` method in the Comparable interface?
Q5
Which collection in Java does not allow duplicate elements?
Q6
Which type of exception is thrown by the Java Virtual Machine (JVM) when an arithmetic operation results in a value too large for the data type?
Q7
In Java, which exception is thrown when attempting to divide by zero?
Q8
Which Java keyword is used to prevent a method or class from being overridden or extended?
Q9
Which Java class is used to read input from the keyboard?
Q10
What is the output of the following code snippet in Java? `System.out.println("5 + 2 = " + 5 + 2);`
Q11
Which Java annotation is used for marking a method as a JUnit test case?
Q12
Which Java keyword is used to declare a constant?
Q13
Which design pattern is used to create objects without exposing the instantiation logic to the client?
Q14
What is the result of the following code in Java? `System.out.println(Math.min(Double.MIN_VALUE, 0.0));`
Q15
In Java, what is the purpose of the `StringBuilder` class?
Q16
Which Java data type is used to store a single 16-bit Unicode character?
Q17
What does the `break` statement do in a Java loop?
Q18
In Java, what is the purpose of the `equals` method in the Object class?
Q19
What is the default value of a member variable (field) of an object in Java if it is not explicitly initialized?
Q20
What is the purpose of the `StringBuffer` class in Java?
Q21
Which operator in Java is used for short-circuit logical AND?
Q22
What is the purpose of the `hashCode()` method in Java's Object class?
Q23
Which of the following is not a maven goal?
Q24
What is the output of the following code in Java? `System.out.println("Hello" + 1 + 2 + 3);`
Q25
In Java, which keyword is used to explicitly call the superclass constructor?