int something = 3; // or 0... System.out.println(17 % something); What happens when you calculate 17 modulo something? First 17 is divided by something, and then the remainder is returned. When you calc. x % 0...
Hi............................ Try this interesting code,it will add to your knowledge. code: class FloatExample { public static void main(String ar[]) { System.out.println(2.0/0); } }