1. What is the purpose of the “break” statement in Java?
Ans. It is used to terminate a loop or switch statement prematurely.
2. What is the purpose of the “continue” statement in Java?
Ans. It is used to skip over a particular iteration in a loop.
1. What is the purpose of the “break” statement in Java?
Ans. It is used to terminate a loop or switch statement prematurely.
2. What is the purpose of the “continue” statement in Java?
Ans. It is used to skip over a particular iteration in a loop.