In Java, this method is used to generate a random number
What is Math.random?
This Java keyword is used to define a decision-making structure, where different code blocks are executed based on a specific condition
What is "if/switch"?
This is the index of the very first item in an array
What is 0?
The output of:
if (5 * 7 < 4 * 9) return true; else return false;
What is true?
In Java, this method checks the length of a string data type
What is .length()?
What is a "semicolon"?
This Java keyword is used to skip the rest of the code inside of a loop and immediately proceed with the next iteration
What is "continue"?
The index of 27 in the array:
[13, 4, 29, 28, 27, 42, 5]
What is 4?
In Java, this method lets you check if a character is a digit
What is Character.isDigit()?
The Java syntax for creating a single line comment
What is "two forward slashes"? (//)
This Java keyword is used to immediately terminate the execution of a loop, executing the next section of code after the loop
What is "break"?
The output of the following code when i = 3:
numbers[] = {10, 20, 30, 40, 50, 60}
for(i:numbers) System.out.println(numbers[i]);
What is "40"?
If you name your Scanner scanner, this piece of code will read a double entered by a user
What is "scanner.nextDouble()?
This Java loop will always execute at least one time, and then continue executing as long as the condition is met
What is a "do-while" loop?
The value of the variable 'avg' in:
numbers[] = {1, 2, 3, 4, 5};
for (i:numbers) sum += i; avg = sum/i;
What is "3"?
The names of 3 primitive data types for numbers in Java
What is short/int/long/float/double?
In Java, this method lets you convert a lowercase letter to uppercase
What is Character.toUpperCase()?
This is the process of converting a variable from one data type to another
What is "casting"/"type-casting"?
This Java loop iterates through each element of an array, collection, or other iterable object
What is a "for-each" loop?
The default value of an uninitialized element in an integer array
What is "0"?