while(true)是一个无穷循环语句 我们必须在他的循环语句内部加入一个判断 当他达到了什么要求就会跳出
int i =1
while(true)
{
if(i>10)break;
i++;
}这样最后弹出的就是11;