問題文
An enum declares one field, a constructor that takes a single argument, and a getter for the field. Which statement about that enum is accurate?
選択肢
- Each constant passes its own argument to the constructor at the point where the constant is declared, and the constructor is implicitly private
- The constructor runs each time one of the constants is read, so the getter observes a freshly built value
- The field has to be declared static, because every one of the constants of an enum type shares a single copy of the state
- The constructor has to be declared public so that the constants are able to reach it, because those constants live outside the body of the enum type