Women in Technology

Hear us Roar



Article:
  Enums in Java (One More Time)
Subject:   Enums and ints
Date:   2003-05-22 21:20:06
From:   anonymous2
Your solution is extremely elegant. However without going to the trouble of adding that level of complexity the following works quite well.
Consisder an enumerator with a constructor taking a String for its name and an int for its value
public final DayOfWeek extends EnumeratedInt
{
public static int Sunday_Value = 0;