January 29, 2010

Java enums from a given string


To generate a instance of a enum class by a given string you can use the valueOf() method.


enum, Java, Snippets

You may also like

Leave a Reply

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

Information about Data protection

This site uses Akismet to reduce spam. Learn how your comment data is processed.

{"email":"Email address invalid","url":"Website address invalid","required":"Required field missing"}