2018-10-12 19:37:13 +00:00
|
|
|
---
|
|
|
|
title: Loops
|
|
|
|
---
|
|
|
|
# Loops
|
|
|
|
|
|
|
|
Whenever you need to execute a block of code multiple times, a loop will often
|
|
|
|
come in handy.
|
|
|
|
|
|
|
|
Java has 4 types of loops:
|
2018-11-18 03:53:48 +00:00
|
|
|
* [While Loop](while-loop)
|
|
|
|
* [Do...While Loop](do-while-loop)
|
|
|
|
* [For Loop](for-loop)
|
|
|
|
* [For Each Loop](for-each-loop)
|
2018-10-12 19:37:13 +00:00
|
|
|
|
|
|
|
Loops behaviour can be customized using:
|
2018-11-18 03:53:48 +00:00
|
|
|
* [Control Statements](control-statements)
|
|
|
|
* [Break Control Statement](break-control-statement)
|
|
|
|
* [Continue Control Statement](continue-control-statement)
|
2018-10-12 19:37:13 +00:00
|
|
|
|
|
|
|
A special case of loops:
|
2018-11-18 03:53:48 +00:00
|
|
|
* [Infinite Loops](infinite-loops)
|