How many case labels can be in a single switch in Java?

There can be one or N number of case values for a switch expression. The case value must be of switch expression type only. The case value must be literal or constant. It doesn’t allow variables.

Sizin İçin Seçtik  Which data type Cannot be used in switch Java?

Leave a Reply

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