Java Reference
In-Depth Information
The common syntax for a while loop in Java:
while (true) {
do some computation
While creating a while loop be careful to set the condition and the increment. If your con-
dition is such that the code may keep evaluating the condition but may not be able to meet
a condition for exit then you are creating an infinite loop. So be careful.
Search WWH ::

Custom Search