Dec 03

Use the static valueOf() method

enum Colour
{
   red, green, blue
}

Colour red = Colour.valueOf("red");

written by objects \\ tags: , ,


Leave a Reply

You must be logged in to post a comment.