public class TestBreak {
/**
* @param args
*/
public static void main(String[] args) {
e:for (int x=0;x<5 ;x++ )
{
i:for (int y=0;y<=x ;y++ )
{
System.out.print("*");
if (y==3)
{
break e;//break the external circle
}else
break i;//break the internal circle
}
}
}
}
break的一些没有注意的用法
最新推荐文章于 2021-11-28 20:37:42 发布