Arithmetic Expressions Practice Lab

Read each expression. Predict the value BEFORE you'd ever run it.

Reminders:
- Dividing two ints always truncates (drops the decimal) - it does NOT round.
- Dividing an int by zero throws an ArithmeticException - if that's the answer, check the "throws an exception" box instead of typing a number.
- Dividing a double by zero does NOT throw - it produces Infinity instead.
- A (int) cast truncates TOWARD ZERO, even for negative numbers - so (int) -7.9 is -7, not -8.
- % gives you the remainder, not the quotient.
- Normal order of operations applies: *, /, %, and (int) casts happen before + and -, left to right.
0 of 10 solved