You probably had a typo when you first ran it.
evaluating 0.5 % 0.3 returns ‘0.2’ (A double) as expected.
Mindprod has a good overview of how modulus works in Java.
You probably had a typo when you first ran it.
evaluating 0.5 % 0.3 returns ‘0.2’ (A double) as expected.
Mindprod has a good overview of how modulus works in Java.