首页 > 代码库 > 奇葩的细节

奇葩的细节

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
-2147483648
true