Mega Code Archive
Find maximum of two numbers using Math max
public class Main {
public static void main(String[] args) {
System.out.println(Math.max(2, 4));
System.out.println(Math.max(3.4f, 4.3f));
System.out.println(Math.max(6.34, 1.45));
System.out.println(Math.max(4l, 5l));
}
}