Professional Documents
Culture Documents
for( ; ; ){
do something;
The statement run the syntax we type but it will loop the code forever, or programmer said that
the syntax id infinite looping. The pic ture below show infinite looping.
4. Can you always convert a while loop into a for loop? Convert the following while loop into a
for loop.
The answer is yes, we can change the syntax from while loop to for loop, they have same
characteristic but different appearance.
5. After the continue statement is executed in the following loop, which statement is
executed? Show the output.
The statement that execute is statement System.out.println(i*j);
The output is: