Hallo,
habe ein Problem, bei dem ich nicht weiterkomme und hoffe, dass ihr mir helfen könnt.
Meine Klasse sieht folgendermaßen aus:
public class Snake {
 public static enum Directions {UP, DOWM, RIGHT, LEFT};
 public Snake() {
 }
 public boolean move() {
 Directions dir = Directions.DOWM;
 switch(dir) {
 case Directions.DOWM:
 break;
 case Directions.LEFT:
 break;
 case Directions.RIGHT:
 break;
 case Directions.UP:
 break;
 }
 return true;
 } 
}
Beim Compilieren meldet mir der Compiler
Snake.java:36: an enum switch case label must be the unqualified name of an enumeration constant
 case Directions.DOWM:
Snake.java:38: an enum switch case label must be the unqualified name of an enumeration constant
 case Directions.LEFT:
Snake.java:38: duplicate case label
 case Directions.LEFT:
Snake.java:40: an enum switch case label must be the unqualified name of an enumeration constant
 case Directions.RIGHT:
Snake.java:40: duplicate case label
 case Directions.RIGHT:
nake.java:42: an enum switch case label must be the unqualified name of an enumeration constant
 case Directions.UP:
Snake.java:42: duplicate case label
 case Directions.UP:
Könnt ihr mir sagen, wo mein Fehler liegt?
Vielen Dank,
mainfield
