Online Java Compiler By
JavaTpoint.com
public class MaxExample1 { public static void main(String args[]) { int x = 20; int y = 50; //print the maximum of two numbers System.out.println(Math.max(x, y)); } }
Output