When using integer arithmetic the % operator is the modulus
in integer
format, but Java allows the % operator to be used to
determine the
decimal part when working with reals. Seen in the API for
Java.
Tony
On 10/8/2010 12:06 PM, Ron Ouwerkerk wrote:
> Does anyone else find the fact that Java allows
1.2345%1 = 0.2345
> disconcerting?
It can be quite useful but to me it's not mathematically
> sound since the % operator is integer division. Or am I missing something
> in Java?
>