Can enum values be strings?

Every enum has both a name() and a valueOf(String) method . The former returns the string name of the enum, and the latter gives the enum value whose name is the string.

Sizin İçin Seçtik  Is React Native worth to learn?

Leave a Reply

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