1Integer.MAX_VALUE //== 2147483647, once you increment past that, you
2 //"wrap around" to Integer.MIN_VALUE
1//Integer.MAX_VALUE (MAX_VALUE Method In Integer Wrapper Class)
2 -2,147,483,648 //(Value)
3In Java, the integer(long) is also 32 bits, but ranges from
4-2,147,483,648 to +2,147,483,647.
1public class Test
2{
3 public static void main(String[] args)
4 {
5 System.out.println(Integer.MIN_VALUE);
6 System.out.println(Integer.MAX_VALUE);
7 System.out.println(Integer.MIN_VALUE - 1);
8 System.out.println(Integer.MAX_VALUE + 1);
9 }
10}