Arithmetic Operators
Java's +, -, and * arithmetic operators perform
addition, subtraction, and multiplication in the normal
fashion.
Java performs division differently depending on
whether the numbers/operands being divided are
integers or floating-point numbers.
When the Java Virtual Machine (JVM) performs
division on floating-point numbers, it performs
"calculator division." We call it "calculator division"
because Java's floating-point division works the same
as division performed by a standard calculator. For
example, if you divide 7.0 by 2.0 on your calculator,
you get 3.5. Likewise, this code fragment prints 3.5:
System.out.println(7.0 / 2.0);
28