Forum

Number Of Page View:100,000+/Months
LOGIN |New User

Reply

max()
The max() method takes two numeric arguments and returns the greater of the two for example,
x = Math.max(1024, -5000); // output is 1024.
             This method is overloaded to handle int, long, float, or double arguments. If the
input parameters are the same, max() returns a value equal to the two arguments. The signatures of the max() method are as follows : 
public static int max(int a, int b)
public static long max(long a, long b)
public static float max(float a, float b)
public static double max(double a, double b)
Posted By: Name:Rajesh Kr URL: max()