1234567891011121314151617181920212223242526272829 |
- /**
- * ClassName: TestSwitch01
- * Package: PACKAGE_NAME
- * Description:
- *
- * @Author 爱扣钉-陈晨
- * @Create 2023/9/17 10:23
- * @Version 1.0
- */
- public class TestWhile04 {
- public static void main(String[] args) {
- //循环10次helloworld
- int i = 0;
- while ( i < 10 ){
- System.out.println("行号"+ (i+1)+ " helloworld");
- i++;
- }
- /*
- 初始化 int i = 0;
- 条件判断 ( i < 10 )
- 循环体 System.out.println("行号"+ (i+1)+ " helloworld");
- 迭代 i++;
- */
- }
- }
|