VariableExample.java

ExpressionExample.java

More about % mod operator.

Deitel chapter 2, 3