Drag the edges to resize the window.

Code Editor
Learn
Introduction to Java

Math: +, -, *, and /

Now let's try arithmetic in Java. You can add, subtract, multiply, and divide numbers and store them in variables like this:

int sum = 34 + 113; int difference = 91 - 205; int product = 2 * 8; int quotient = 45 / 3;
Report a Bug
If you see a bug or any other issue with this page, please report it here.