An enumeration, or “enum� is a set of constants to represent various values.
Java 1.4 way:
public static final int RED = 0;
public static final int YELLOW = 1;
public static final int GREEN = 2;
setColor(RED); // but also
setColor(10);
Here’s the Tiger’s way of doing it:
enum Color { RED, YELLOW, GREEN }