public class Test { public static void main(String[] string){ int i = Integer.MAX_VALUE; System.out.println(i); long t = i + 1; System.out.println(t); System.out.println(i>t); } }
运行结果:
2147483647-2147483648true