How do I convert an enum to a string?

There are two ways to convert an Enum to String in Java, first by using the name() method of Enum which is an implicit method and available to all Enum, and second by using toString() method .

Sizin İçin Seçtik  Are generics Typesafe?

Leave a Reply

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