Can switch-case be used for all data types?

A switch works with the byte , short , char , and int primitive data types . It also works with enumerated types (discussed in Enum Types), the String class, and a few special classes that wrap certain primitive types: Character , Byte , Short , and Integer (discussed in Numbers and Strings).

Sizin İçin Seçtik  Can you use a switch statement with a string C++?

Leave a Reply

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