The switch…case Statement

Advertisements
Advertisements
Advertisements3
Advertisements4
Advertisements6
Advertisements66

 1. What is the purpose of the “break” statement in a switch-case block in Java?

Ans. To continue executing the next case statement.

2. What is the purpose of the “default” case in a switch-case block in Java?

Ans. To provide a default behavior if none of the cases match.

 
 

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