1
JavaAdvanced#puzzle#oop
10 / 3 with two ints performs integer division, truncating the result to 3. 10.0 / 3 uses floating-point division, producing 3.3333333333333335. 10 % 3 is the remainder, 1.
System.out.println(10 / 3); // 3 System.out.println(10.0 / 3); // 3.3333333333333335 System.out.println(10 % 3); // 1