Operators
Print Formatting
Logic
Loops
Syntax
100

The result of: 10.0/2

What is "5.0"?

100

The print format specifier used to output a floating point number with 2 decimal places of accuracy.

What is "%.2f"?

100

In Java, && means this logical operator

What is "and"?

100

The number of times the following loop iterates:

for (int i = 0; i < 5; i++) 

What is "5"?

100

The syntax for raising a number "a" to the power "b" in Java

What is "Math.pow(a, b)"?

200

The result of: 10 % 3 

What is "1"?

200

The print format specifier used to output a boolean data type. 

What is "%b"?

200

In Java, || means this logical operator

What is "or"?

200

In Java, this value will tell a loop to stop executing

What is a "sentinel"?

200

The syntax for checking if a variable "a" is not equal to a variable "b"

What is "if (a != b)"?

300

The result of: 5 / 2

What is "2"?

300

The output of: System.out.printf("%05d", 21);

What is "00021"?

300

In Java, this logical operator determines if two values are the same

What is "=="?

300

The number of times the following loop iterates:

for (int i = 1; i <= 2; i++) 

        for (int j = 1; j <= 6; j++) 

What is "12"?

300

The Java syntax for creating a multi-line comment

What is "/* .... */"?

400

The result of: (5 / 2 * 8) % 3

What is "1"?

400

The output of: 

System.out.printf("%05d %d", 1, 2, 3);

What is "00001 2"?

400

The truth value of the expression: !(5 > 3)

What is "false"?

400

The output of the following loop:

for (int i = 2; i <= 10; i += 2)

     System.out.println(i);

What is "2, 4, 6, 8, 10"?

400

The syntax for a "for" loop that iterates backward from 10 and stops at 1. 

What is "for(int i = 10; i >= 1; i--)"?

500

The output of:

int i = 10;

i += 3 * 4 - 2;

System.out.print(i);

What is "10"?

500

The output of: 

System.out.printf("%-6b %n %s", (1 > 2), "Java");

What is "false

              Java"

500

The truth value of the expression: 

(true || false) && (true && false)

What is "false"?

500

The output of the following loop: 

for (int i = 1; i <= 5; i++) 

      System.out.println(i * i - i);

What is "0, 2, 6, 12, 20"?

500

The syntax for declaring an array called "array" of size 5 with default integer values

What is "int[] array = new int[5]"?

M
e
n
u