Operators

You apply operators to integer variables to change a value or evaluate an expression for other use. The operators that apply to integers are described here in several related categories. Those not discussed in this section are covered in Chapter 5, "Using Expressions," and Chapter 6.

Arithmetic Operators

Arithmetic operators are used to perform standard mathematical operations on variables. These operators include:

+ Addition operator
Subtraction operator
* Multiplication operator
/ Division operator
% Remainder operator (gives the remainder of a division)

The only operator in this list that you might not be familiar with is the remainder operator. The remainder of an operation is the remainder of the divisor divided by the dividend. ...

Get Special Edition Using Java 2 Standard Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.