public class Test2 {
public enum Dogs {collie, harrier, shepherd};
public static void main(String [] args) {
Dogs myDog = Dogs.shepherd;
switch (myDog) {
case Dogs.collie:
System.out.print("collie ");
default:
System.out.print("retriever ");
case harrier:
System.out.print("harrier ");
}
}
}
what is the error?
an enum switch case label must be the unqualified name of an enumeration constant
Wednesday, December 19, 2007
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment