Enumerations: Why? When?

后端 未结 7 1095
梦如初夏
梦如初夏 2020-11-30 08:37

I am an almost-graduating computer science student, and throughout my coding career, I\'ve found very few instances where enumerations, except for canonical cases such as re

7条回答
  •  我在风中等你
    2020-11-30 09:00

    As Manuel Selva suggested, read Effective Java Second Edition, but also read the singleton section. Using enum is the easiest way to have a clean singleton object.

提交回复
热议问题