Addition and subtraction : 1 + 1 = 2 2 - 1 = 1 Multiplication, division, and modulus : 5 % 2 = 1 5 % 0 = $rem2 7 % 2 = 1 5 / 2 = 2 5 / 0 = $rem4 5 * 2 = 10 5 * -1 = -5 5 * -2 = -10 5 * -2 = -10 And now null nodes to make sure it doesn't throw an NPE :