1/11
Looks like no tags are added yet.
What are int, double, and boolean?
int = whole numbers, double = decimal numbers, boolean = true or false
What is the difference between "int x;" and "x = 5;"?
"int x;" creates the variable name/type. "x = 5;" puts the value inside it.
What does % (modulus) do?
It finds the remainder of division (like 5 % 2 = 1).
What is 7 / 2 in Java?
3 (Java cuts off the decimal for whole numbers).
How do you get 3.5 instead of 3 from 7 / 2?
Add a decimal to at least one number (like 7.0 / 2).
print() vs. println()?
print() stays on the same line. println() moves to a new line after printing.
How does "x = 2 + 3;" evaluate?
Java solves the right side first (5), then stores it in x.
What is the order of math operations in Java?
What does (int) 5.99 do?
It chops off the decimal completely, resulting in 5.
What happens if an int goes past its maximum possible limit?
Overflow (it wraps around to a negative number).
What do x++ and x += 3 mean?
x++ adds 1 to x. x += 3 adds 3 to x.