整形越界,死循环,产生莫名其妙的问题
Posted qiumingcheng
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了整形越界,死循环,产生莫名其妙的问题相关的知识,希望对你有一定的参考价值。
public static void main(String[] args) throws Exception {
int i = 1;
boolean flag = false;
while (!flag) {
if(i == 0){
System.out.println("child thread xxxx:"+(i));
i=i+1;
}else {
i=i+1;
}
}
}
一直输出 :child thread xxxx .. 血的教训啊。
以上是关于整形越界,死循环,产生莫名其妙的问题的主要内容,如果未能解决你的问题,请参考以下文章