24 lines
602 B
Markdown
24 lines
602 B
Markdown
---
|
||
title: Loops
|
||
localeTitle: 循环
|
||
---
|
||
# 循环
|
||
|
||
每当您需要多次执行代码块时,通常会循环 派上用场了。
|
||
|
||
Java有4种类型的循环:
|
||
|
||
* [而Loop](loops/while-loop)
|
||
* [做......循环](loops/do-while-loop)
|
||
* [对于循环](loops/for-loop)
|
||
* [对于每个循环](loops/for-each-loop)
|
||
|
||
可以使用以下方法自定义循环行为:
|
||
|
||
* [控制声明](loops/control-statements)
|
||
* [中断控制声明](loops/break-control-statement)
|
||
* [继续控制声明](loops/continue-control-statement)
|
||
|
||
循环的一个特例:
|
||
|
||
* [无限循环](loops/infinite-loops) |