Hello,
I am moving to Java from Delphi and have a question...
In Delphi, it's legal to create enumerated types like:
type Suit = (Club, Diamond, Heart, Spade);
which defines an enumerated type called Suit whose possible values are Club, Diamond, Heart, and Spade.... Therefore, when I create a variable of type 'Suit', it has to be one of these values (or nil).
How do I re-create this behavior in Java?
Thanks in advance for any help.
Rich.
I am moving to Java from Delphi and have a question...
In Delphi, it's legal to create enumerated types like:
type Suit = (Club, Diamond, Heart, Spade);
which defines an enumerated type called Suit whose possible values are Club, Diamond, Heart, and Spade.... Therefore, when I create a variable of type 'Suit', it has to be one of these values (or nil).
How do I re-create this behavior in Java?
Thanks in advance for any help.
Rich.