Question 1 of 25
Hints left: 3
Q1
In Java, which collection class does not allow duplicate elements and is typically implemented as a binary tree?
Q2
Which Java keyword is used to declare a class method that can be called without creating an instance of the class?
Q3
In Java, which data type is used to represent true or false values?
Q4
Which Java keyword is used to explicitly specify that a variable cannot be changed after it is assigned a value?
Q5
What is the result of the following code in Java? `System.out.println(5 / 0);`
Q6
In Java, which collection is typically implemented as a dynamic array that can grow or shrink in size?
Q7
Which Java keyword is used to define a constant interface?
Q8
What is the purpose of the `@Override` annotation in Java?
Q9
Which Java operator is used for short-circuit logical OR?
Q10
In Java, what does the `System.exit(0);` statement do?
Q11
Which Java exception is thrown when an array index is out of bounds?
Q12
Which Java operator is used to perform a logical NOT operation?
Q13
What does the `finally` block in a Java `try-catch-finally` construct do?
Q14
In Java, what is the purpose of the `NullPointerException`?
Q15
Which Java operator is used to perform bitwise AND between two integers?
Q16
What is the primary purpose of the `finally` block in a Java exception handling structure?
Q17
What is the output of the following code snippet in Java? `System.out.println("Java".substring(0, 2));`
Q18
What is the result of the following code in Java? `System.out.println(10 > 5 ? "true" : "false");`
Q19
In Java, what is the role of the `System.arraycopy` method?
Q20
In Java, which data type represents a sequence of characters and is enclosed in double quotes?
Q21
What is the purpose of the `try-with-resources` statement in Java?
Q22
What is the purpose of the `@SuppressWarnings` annotation in Java?
Q23
What does the `break` statement do when used in a `switch` statement in Java?
Q24
Which Java keyword is used to create a new instance of a class?
Q25
What is the purpose of the `String.format()` method in Java?