Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVA

MAXIMUM OF THE 2 NUMBERS IN JAVA USING MATH.MAX

import java.util.*;
public class maximum
{
    public static void main()
    {
        System.out.println("ENTER THE TWO NUMBER TO CHECK THE MAXIMUM ONE");
        Scanner a = new Scanner (System.in);
        int b  = a.nextInt();
        int c = a.nextInt();
        int d = Math.max(b,c); 
        System.out.println("MAXIMUM BETWEEN "+b+" and "+c+ " is " +d);
      //MADE BY CodeWithParth
    }
}
 
PREVIOUS NEXT
Tagged: #MAXIMUM #OF #THE #NUMBERS #IN #JAVA #USING
ADD COMMENT
Topic
Name
4+5 =