Problems with "enum" in Xcode 2.4
Hello,
Using a MacBook, Xcode 2.4, trying to compile this code in class "Card.java":
publicclass Card{
publicenum Rank{ DEUCE, THREE, FOUR, FIVE, SIX,
SEVEN, EIGHT, NINE, TEN, JACK, QUEEN, KING, ACE}// Line 10
publicenum Suit{ CLUBS, DIAMONDS, HEARTS, SPADES}// Line 13
privatefinal Rank rank;
privatefinal Suit suit;
private Card(Rank rank, Suit suit){
this.rank = rank;
this.suit = suit;
}
}// class ends
However, when I use Xcode's "Build" command, I get the following errors and warnings:
Card.java:10: warning: as of release 1.5, 'enum' is a keyword, and may not be used as an identifier
Card.java:10: ';' expected
Card.java:13: warning: as of release 1.5, 'enum' is a keyword, and may not be used as an identifier
Card.java:13: ';' expected
If I run "javac" on this file, it works just fine - and the code is from an example somewhere on sun.java.com. Do anyone understand why this does not work? Have I misunderstood the "enum" syntax, or is this Xcode-related?
Appreciate any help on this - I would like to use Xcode (or like to know if I can't).

