Which design pattern is used to create objects without exposing the instantiation logic to the client?
Select an option to see the answer and solution.
In Java, which keyword is used to explicitly call the superclass constructor?
Select an option to see the answer and solution.
What is the output of the following code snippet in Java? `System.out.println("5 + 2 = " + 5 + 2);`
Select an option to see the answer and solution.
What is the purpose of the `hashCode()` method in Java's Object class?
Select an option to see the answer and solution.
Which Java keyword is used to prevent a method or class from being overridden or extended?
Select an option to see the answer and solution.
What is the result of the following code in Java? `System.out.println(Math.min(Double.MIN_VALUE, 0.0));`
Select an option to see the answer and solution.
Which collection in Java does not allow duplicate elements?
Select an option to see the answer and solution.
What does the `volatile` keyword in Java do?
Select an option to see the answer and solution.
In Java, which exception is thrown when attempting to divide by zero?
Select an option to see the answer and solution.
Which Java data type is used to store a single 16-bit Unicode character?
Select an option to see the answer and solution.
What does the `break` statement do in a Java loop?
Select an option to see the answer and solution.
Which Java class is used to read input from the keyboard?
Select an option to see the answer and solution.
What is the default value of a member variable (field) of an object in Java if it is not explicitly initialized?
Select an option to see the answer and solution.
In Java, what is the purpose of the `StringBuilder` class?
Select an option to see the answer and solution.
Which operator in Java is used for short-circuit logical AND?
Select an option to see the answer and solution.
Which Java annotation is used for marking a method as a JUnit test case?
Select an option to see the answer and solution.
In Java, what is the purpose of the `equals` method in the Object class?
Select an option to see the answer and solution.
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?
Select an option to see the answer and solution.
What is the purpose of the `StringBuffer` class in Java?
Select an option to see the answer and solution.
Which Java keyword is used to declare a constant?
Select an option to see the answer and solution.