标签:ati public stat pre max [] main long ring
物极必反
public class Test {
public static void main(String[] args) {
int a = Integer.MAX_VALUE;
long b = a + 1;
System.out.println(a); // 2147483647
System.out.println(b); // 物极必反 -2147483648 溢出
}
}
答案:
2147483647
-2147483648
标签:ati public stat pre max [] main long ring
原文地址:https://www.cnblogs.com/hglibin/p/9940203.html