max value in java int code example
Example 1: java max integer
Integer.MAX_VALUE //== 2147483647, once you increment past that, you
//"wrap around" to Integer.MIN_VALUE
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