Is there a convention for naming enumerations in Java?
My preference is that an enum is a type. So, for instance, you have an enum
Fruit{Apple,Orange,Banana,Pear, ... }
NetworkConnectionType{LAN,Data_3g,Data_4g, ... }
I am opposed to naming it:
FruitEnum
NetworkConnectionTypeEnum
I understand it is easy to pick off which files are enums, but then you would also have:
NetworkConnectionClass
FruitClass
Also, is there a good document describing the same for constants, where to declare them, etc.?
Question&Answers:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…