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