阅读背景:

为什么用枚举代替常量?

来源:互联网 

I have a scenario in which I have Player types ARCHER,WARRIOR, and sorcerer. What should I use in player class? A String variable for type or a Enum? Why enum and why Constant Strings. Please help with reasons.I have a scenario in which I have Player types




你的当前访问异常,请进行认证后继续阅读剩余内容。

分享到: