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  Which is the best algorithm course on Coursera?

Leave a Reply

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