Branching Statement (Break & Continue)

Advertisements
Advertisements
Advertisements3
Advertisements4
Advertisements6
Advertisements66

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.

 
 

Author: Lakshmi Prasanna Ponnala

Completed M.Tech in Digital Electronics and Communication Systems.

Leave a Reply

error: Content is protected !!

Discover more from ece4uplp

Subscribe now to keep reading and get access to the full archive.

Continue reading