What is the syntax of switch case in Java?

The switch expression is evaluated once. The value of the expression is compared with the values of each case . If there is a match, the associated block of code is executed . The break and default keywords are optional, and will be described later in this chapter.

Sizin İçin Seçtik  Can you put multiple cases in a switch statement?

Leave a Reply

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