赞
踩
public class OverflowLoop{ public static final int END =Integer.MAX_VALUE; public static final int START = END -100; public static void main(String[] args) { int j=0; for (int i=START;i<=END;i++){ j++; } System.out.println(j); } } int i 在最后溢出了,不过Intellij IDEA 不知道咋搞的,这个运行变成了System.in。
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。