What is the output of the following code snippet?
int x = 10;
System.out.println(x++);
What is the result of the following code snippet?
String str = "Java";
System.out.println(str.substring(1, 3));
What does the "public" access modifier indicate in Java?
What is the result of the following code snippet?
int x = 10;
x += 5;
System.out.println(x);
What is the output of the following code snippet?
System.out.println(10 != 5);
What is the purpose of the "finally" block in a try-catch-finally statement in Java?
What does the "break" statement do in Java?
What does the "super" keyword do in Java?
What is the output of the following code snippet?
int x = 5;
int y = 3;
System.out.println(x % y);
What is the output of the following code snippet?
String str = "Java";
System.out.println(str.indexOf('a'));
What does the "extends" keyword indicate in Java?
What is the output of the following code snippet?
String str = "Hello";
System.out.println(str.length());
Which of the following is a valid long literal?
Evaluate the following Java expression
int x=3, y=5, z=10;
System.out.println(++z + y - y + z + x++)
What is the output of the following code snippet?
int[] numbers = {1, 2, 3, 4, 5};
System.out.println(numbers[3]);
Which of the following is NOT a valid Java identifier?
What is the output of the following code snippet?
String str = "Java";
System.out.println(str.charAt(2));
What does the "protected" keyword indicate in Java?
What is the purpose of the "continue" statement in Java?
What is the output of the following code snippet?
int[] arr = {1, 2, 3, 4, 5};
for (int i : arr) {
if (i == 3) {
continue;
}
System.out.print(i + " ");
}
Which of the following is NOT a Java keyword?
What is the output of the following code snippet?
int x = 5;
int y = 2;
System.out.println(x / y);
What does the expression float a = 35 / 0 return?
What does the "implements" keyword indicate in Java?
What is the purpose of the "import" keyword in Java?
Which of the following is NOT a primitive data type in Java?
Which keyword is used to create an instance of a class in Java?
Which of the following is true about Java arrays?
Which of the following is true about Java interfaces?
What is the output of the following code snippet?
String name = "Java"; System.out.println("Hello, " + name + "!");
What does the "this" keyword refer to in Java?
What does the "void" keyword indicate in Java?
What is the output of the following code snippet?
int x = 10;
int y = 5;
System.out.println(x 5);
Which operator is used for comparing two numbers for equality in Java?