} }
java 9随记
一次手环记数的例子,看java 的代码
public class TestContinue {
public static void main(String[] args) {
int total = 0;
while (true) {
total++;
int i = (int) (Math.random() * 100);
System.out.println(i);
if (i == 66) {
break;
}
}
System.out.println("总共次数" + total);