How java ensures only one instance of an enum per JVM
问题 How does Java ensure internally that only one instance of an ENUM would exist per JVM? Is it created when application boots up and from that point on when multiple threads access it, it will just return the object created at startup? Or does it implement some kind of double synchronization similar to the singleton pattern so that even if multiple threads access it, only one istance will be created? 回答1: as you can read in this answer enum instances are static class fields and so are