Jon
//I can't call HEARTS because my interpreter does not recognize suit, although it's declared as a private enum
Jon Camilleri wrote:4 suits of cards, 14 cards for each suit, however, I want the enum to be available globally within the application.
Unnar Björnsson wrote:Personally I usually give a class a number of public static constants:
And refer to it's suit and number with integers
SCJP 1.4 - SCJP 6 - SCWCD 5 - OCEEJBD 6 - OCEJPAD 6
How To Ask Questions How To Answer Questions
Jon
Matthew Brown wrote:That's a shame - because the enum approach is so much better than that.
Jon
Jon Camilleri wrote:
My code includes enums for ease of reference
Hauke Ingmar Schmidt wrote:
Jon Camilleri wrote:
My code includes enums for ease of reference
Where?
Jon
Jon Camilleri wrote:
Hauke Ingmar Schmidt wrote:
Jon Camilleri wrote:
My code includes enums for ease of reference
Where?
Scroll up..
Matthew Brown wrote:You aren't using enums in that code - you're using shorts.