1Integer.MAX_VALUE //== 2147483647, once you increment past that, you
2 //"wrap around" to Integer.MIN_VALUE
1public int x = Integer.MAX_VALUE;
2
3System.out.println(x)
4
5// prints out 2147483647. you can't go over this number
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}