Break statement: -
The break statement can be used within either
looping bodies or switch statements. It can be used either conditionally or
unconditionally. It is used to terminate the looping bodies by force this type
of termination is called as premature termination.
Continue statement: -
It can be used within looping statements only
either conditionally or unconditionally. It is same as the closing curly brace
of loop i.e. it sends out the curser at
the top of the loop for further execution thus all the statements written below
the “continue” are ignored by the compiler.
No comments:
Post a Comment