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  Can switch case be used for strings in C?

Leave a Reply

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