maxvalue in java code example
Example 1: java max
public class Test {
public static void main(String args[]) {
System.out.println(Math.max(12.123, 12.456));
System.out.println(Math.max(23.12, 23.0));
}
}
Example 2: max_value in java
(stores the maximum possible value for any integer variable)
public static void main(String[] arg)
{
System.out.println("Integer.MAX_VALUE = "
+ Integer.MAX_VALUE);///output :-2147483647
}
}
Any integer variable cannot store any value beyond this limit