Explain break and continue statement.
Answers
Answered by
5
BREAK
Break is a jump statement which is use to avoid execution of all other condition ,if one condition had become true.
It is used in switch statement, to pass out the control of switch block after execution of a defined case.It is also considered aa a case terminator in switch statement.
CONTINUE
Continue statement is used to skip a particular statement if the condition is true or false.
It is opposite of break startement .When continue statement is used in a loop it skips the rest of statement for that value and continues with the next iterartion.
Similar questions