1

I was doing some Minecraft plugin programming and accidentally referenced something initialized at server start (a config file reader) in an enum constructor. To my surprise, it worked! I was under the impression that enums initialized right after static fields. I did some investigating, and the enum constants weren't initialized until after the enable method was already run. This has me wondering: when are enum constants actually initialized?

SaxSalute
  • 349
  • 2
  • 8

0 Answers0