Continue statement - skipping a part of a loop

Continue statement - skipping a part of a loop


               Continue statement is used to skip a part in the body of the loop. When this statement is used inside a loop it skips the execution of the remaining statements in the body of the loop after the keyword continue and continue with the next iteration.

The general form is

continue;

                When this statement is used inside a for loop the control is transferred to the beginning of the loop. If it is used inside while or do loops the control is transferred to the test condition.

No comments:

Post a Comment

Creating Objects

Creating Objects                  Creating objects means to allocate memory space for all the instance variables of the objects. S...