diff --git a/guide/english/java/loops/for-loop/index.md b/guide/english/java/loops/for-loop/index.md index cfbe8d8f4c..55f71f8936 100644 --- a/guide/english/java/loops/for-loop/index.md +++ b/guide/english/java/loops/for-loop/index.md @@ -68,6 +68,8 @@ System.out.println("The sum of the first 50 numbers is: " + 50); ### Extras +One thing to keep in mind is that for is also an entry controlled loop just like while loop, where condition is checked at the beginning. So, do keep that in mind before writing the starting condition of the loop. + You cannot use a number (old C-style language construct) or anything that does not evaluate to a boolean value as a condition for an if statement or looping construct. You can't, for example, say if(x), unless x is a boolean variable. Also, it is important to keep in mind that the boolean expression must, at some point, evaluate to true. Otherwise, your program will be stuck in an infinite loop.