How long have enum constructors' default access modifier been "private"? Since the beginning or did it change in Java 8? If it did, then what was the default access modifier of a constructor declaration with no access modifier? (I'm guessing it is the default(package accessible) like other java classes' constructors.)
I found some reference documents related to this, but couldn't find the exact answer. Here's what I've found,
- Java8 JLS 8.9.2, In an enum declaration, a constructor declaration with no access modifiers is private.
- Java7 JLS 8.9.2, If an enum type has no constructor declarations, then a private constructor that takes no parameters (to match the implicit empty argument list) is automatically provided.