Hire QA – Specialized in QA Recruitment, Technical Interviews and Testing Solutions

What is break and continue statement?

Category: Java

We can use break statement to terminate for, while, or do-while loop. We can use break statement in switch statement to exit the switch case. You can see the example of break statement at java break. We can use break with label to terminate the nested loops.
The continue statement skips the current iteration of a for, while or do-while loop. We can use continue statement with label to skip the current iteration of outermost loop

Leave a Reply

Your email address will not be published. Required fields are marked *