Does switch work on objects Java?

Data Types. We can’t compare all the types of objects and primitives in the switch statement. A switch works only with four primitives and their wrappers , as well as with the enum type and the String class: byte and Byte.6 Ağu 2020

Sizin İçin Seçtik  Is switch in Java case sensitive?

Leave a Reply

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