Experiment with Arithmetic Basics
In this activity, you will make predictions regarding the outcome of given expressions. You will use the Java Playground to test your predictions.
Grab a Piece of Paper, Predict and Try!
- Create a table on a piece of paper. Include a column for each expression, your prediction, the actual value, and your explanation.
- Take some time to predict the value of each arithmetic expression.
- Once you have recorded all your predictions, run the code in the Java Playground and record the value in the actual value column.
- For any expression where your prediction and the actual value differs, write an explanation of how the expression is evaluated.
- Need Help? Check Out This Tutorial
What does each arithmetic Operator do?
For each operator, write a description of what it does and provide your own example.
- +
- -
- *
- /
- %
- ( )