Math.max(input_number1, input_number2)
System.out.println(Math.max(23, 12)); //23 System.out.println(Math.max(23.4, 12.56)); //23.4 System.out.println(Math.max(7,9)); // 9