String literals are enclosed by these special characters
"What are double quotes?"
A name associated with a memory location in the computer
What is a variable?
What is the final value of z?
What is 3?
This operator can be used to shortcut
x=x-1;
What is x--; or x-=1; ?
These methods are used by programs to display information to the computer monitor (or a console)
What are System.out.print() and System.out.println() ?
A value that a boolean variable can store
What is true or false?
What does the console display?
System.out.println(158 % 10);
What is 8?
What is the final value of x?
int x = 32;
x /= 6;
What does this output?
System.out.println((double) 1 / 3);
What is 0.33333?
This type of error is reported if the Java code is not correctly written.
What is a syntax error?
This type is used to declare a variable that is a real number.
What is a double?
What does the console display?
System.out.println(3 % 400);
What is 3?
What is the final value of x?
int x = 5;
x %= 10 * 2;
What is 5?
What does this output?
System.out.println((double) (1 / 3));
What is 0.0?
Every Java program starts with this.
A public class declaration
e.g. public class MyClass
The two types of variables in Java are primitive and this type
What is an object variable?
What does the console display?
System.out.println("The number is: " + 3 + 3);
What is "This number is: 33"?
The final value of x, y, and z
int x = 3;
int y = 5;
int z = 2;
x *= 4;
y -= 3;
z += y;
What is x = 12, y = 2, z = 4?
What the computer does when you perform integer division and part after the decimal point is thrown away.
What is truncate?
This program translates Java code into a class file that can be run on your computer.
What is a compiler?
Coding challenge
Write a line of code that creates a variable called ringsToRuleThemAll and sets it to the appropriate value.
int ringsToRuleThemAll = 1;
What does the console display?
What is 10.0?
The final value of x, y, and z
int x = 3;
int y = 5;
int z = 2;
x *= z * 2;
y /= y / 2;
z++;
What is x = 12, y = 2, z = 3?
The effect of performing this operation.
(int)(x + 0.5)
What is round to the nearest positive number?