是否有可能在发生整数溢出时抛出某种运行时异常,而不是静默失败.例如
int x = 100000000 * 1000000000;
1569325056由于溢出而打印,我想要的是获得某种运行时异常
1569325056
java java-8
java ×1
java-8 ×1