/*
 * Main.java
 *
 * Created on December 18, 2001, 8:53 AM
 */

/**
 * Enum illustrates the use of the Singleton pattern to produce
 * the same effect as the 'enum' types of C/C++.
 * @author  blessing@msoe.edu
 * @version 0.1
 */
public class Enum {
    /**
    * @param args the command line arguments
    */
    public static void main (String args[]) {
        // create a new day reference
        Day today = Day.TUESDAY;
        Day yesterday = Day.MONDAY;
        if (today == yesterday)
            System.out.println("Error: Days should be unique");
        else
            System.out.println("Days are unique");
        // try to violate the singleton pattern
        //Day tomorrow = new Day("Wednesday");
    }
}
