Modulus Operator Example
public class Main { public static void main(String[] args) { int i = 5; double d = 2; System.out.println("i mod 10 = " + i % 10); System.out.println("d mod 10 = " + d % 10); } } /* i mod 10 = 5 d mod 10 = 2.0 */