java 9随记

2021/12/19 9:49:56

本文主要是介绍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);

 

    } }

这篇关于java 9随记的文章就介绍到这儿,希望我们推荐的文章对大家有所帮助,也希望大家多多支持为之网!


扫一扫关注最新编程教程