Sunday, August 23, 2009

Puzzle 48 - Solution

The code snippet defines an Enum, a feature introduced in Java 1.5.

This code creates a type-safe enumeration with apples, oranges, and grapes as members and for each member a String value is stored (the color of the fruit).

You can read more about enums on http://java.sun.com/docs/books/tutorial/java/javaOO/enum.html

No comments:

Post a Comment

Solution for this question?