Files
Hui-s-notebook/logseq-java/pages/do while 循环.md
2024-02-02 00:12:49 +08:00

14 lines
457 B
Markdown
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
- 属于后验循环
- ```java
int i = 0;
do{
System.out.println("1");
i++;
}while (i <= 10);
```
- while循环和do-while循环有什么区别 #Java面试
id:: 6246b51d-044b-40fb-aa3c-e057f95915b8
- while循环时先验循环,do-while是后验循环
- for循环和while循环有什么区别 #Java面试
id:: 6246b566-602f-4535-89ad-a88b652bca32
- for循环一般适用在已知循环次数而while 一般适用在已知结束条件