- JDK :OpenJDK-11
- OS :CentOS 7.6.1810
- IDE :Eclipse 2019‑03
- typesetting :Markdown
code
package per.jizuiku.base;
/**
* @author 给最苦
* @date 2019/06/29
* @blog www.cnblogs.com/jizuiku
*/
class Demo {
/**
* @param args
*/
public static void main(String[] args) {
int i = 0;
while (i < 3) {
System.out.println("hello");
i++;
}
System.out.println("---------------");
for (int j = 0; j < 3; j++) {
System.out.println("hello");
}
}
}
result
`bash
hello
hello
hello
Original: https://www.cnblogs.com/jizuiku/p/11107767.html
Author: 给最苦
Title: Java基础 while 简单示例
原创文章受到原创版权保护。转载请注明出处:https://www.johngo689.com/538183/
转载文章受原作者版权保护。转载请注明原作者出处!