Example 5.2 in Lab-1106 has the following codes for enum type:
public class UsingTypeSaveEnum {
// Note that FootballScore is now enum type
public enum FootballScore {
TOUCHDOWN(6), FIELDGOAL(3), TWOPOINTS(2), SAFETY(2),
EXTRAPOINT(1);
FootballScore(int value) {
this.score = value;
}
private final int score;
public int score() {
return score;
}
}
...
Does the line: public enum Football ... define an inner class with enum
type? Or is it just defining an enum type called FootballScore?
norman
--~--~---------~--~----~------------~-------~--~----~
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/javaprogrammingwithpassion?hl=en
-~----------~----~----~----~------~----~------~--~---