diff --git a/guide/english/java/loops/while-loop/index.md b/guide/english/java/loops/while-loop/index.md index bc3e9e8863..f99b381fd9 100644 --- a/guide/english/java/loops/while-loop/index.md +++ b/guide/english/java/loops/while-loop/index.md @@ -3,7 +3,10 @@ title: While Loop --- # While Loop -The `while` loop repeatedly executes the block of statements until the condition specified within the parentheses evaluates to `false`. For instance: +The `while` loop repeatedly executes the block of statements until the condition specified within the parentheses evaluates to `false`. +It is usually used when the number of iterations is not fixed. + +For instance: ```java while (some_condition_is_true) @@ -37,4 +40,6 @@ Output: iter_While Value: 10 ``` +An infinite while loop is created when the loop remains true infinitely , maybe because there is no change in the change in value of the condition or it never turns false. + ![:rocket:](//forum.freecodecamp.com/images/emoji/emoji_one/rocket.png?v=2 ":rocket:") [Run Code](https://repl.it/CJYj/0)