1 Reply Latest reply: Oct 20, 2006 1:47 PM by 807598 RSS

    enum data type help

      (Sorry I reposted because I realize the title of the other was inappropriate...)

      Hi anyone can help me with the understanding of "enum" modifier?

      I created a class that uses enum data type and placed the data type in the constructor.

      class EnumTest {
      private enum Type {A, B, C};
      private Type t;

      public EnumTest (int x, Type t) {


      Then I created a driver class to run it but I got error message:

      public class driver {

      enum Type {A,B,C};
      public static void main(String[] args) {

      Type t = Type.A
      int x = 2;
      EnumTest e = new EnumTest(x, t);

      And during compile they say cannot find symbol... I'm new to all these so forgive me if I overlooked something terribly... thanks for your help!!