This keyword is used to begin a basic conditional statement, followed by a boolean expression in parentheses.
What is if?
The three parts of a standard for loop declaration, separated by semicolons.
The value of the first index of any array in Java.
What is zero?
A special method used to initialize objects, having the same name as the class.
What is a constructor?
The name of the method that returns how many characters are in a string.
What is .length()?
A statement type that executes one block of code if the condition is true, and a different block if the condition is false.
What is an if-else statement?
A specific type of loop in Java guaranteed to execute at least once, regardless of the condition.
What is a do-while loop?
The property used to determine the number of elements in an array named arr.
What is arr.length?
The keyword that identifies a reference to the current object (or current instance) within a method or a constructor.
The value that is printed given the following:
String s = "Hello!";
System.out.println(s.charAt(0));
What is H?
This statement is useful for testing a single variable against a series of exact integer, character, or string values.
What is a switch statement?
When placed inside a loop, this keyword immediately terminates the entire loop's execution and transfers control to the statement immediately following it.
What is break?
The type of loop commonly used to print every element in an array sequentially.
What is a for-each loop?
CalculateArea(int side) and CalculateArea(int length, int width) highlight the concept known as this.
What is/are overloaded method(s)?
The value that is printed given the following:
String s = "Hello, World!";
System.out.println(s.indexOf(", W"));
What is 5?
This relational operator checks if two values are equal in Java.
What is ==?
This loop construct is considered ideal for iterating through all elements of an array or collection, as it simplifies the syntax by managing the index or iterator automatically.
What is an enhanced for loop, or a for-each loop?
What an array of integers int[] arr = new int[5]; will contain by default immediately after initialization.
What is/are all zeroes?
This keyword defines a member (variable or method) that belongs to the class itself rather than instances of the class.
What is static?
The value that is printed given the following:
String s = "Spring is almost here!";
System.out.println(s.substring(s.indexOf(" ") + 1));
What is is almost here?
What is the output of the following code snippet?
int x = 5;
if (x > 3)
x++;
if (x == 6)
System.out.println("Six");
What is Six?
The output of the following code snippet:
int count = 0;
while (count++ < 3) {
System.out.print(count + " ");
}
What is 1 2 3 ?
The outcome of the following code: int[] a = {1, 2, 3}; int[] b = a; b[0] = 99; System.out.println(a[0]);.
What is 99?
OOP, one of the most fundamental concepts in Java programming, stands for this.
What is object oriented programming?
The value that is printed given the following:
String s = "West Nottingham Academy";
System.out.println(s.substring(s.lastIndexOf(" ") + 1).toLowerCase());
What is academy?