Forums
New posts
Search forums
Members
Current visitors
Log in
Register
What's new
Search
Search
Search titles only
By:
New posts
Search forums
Menu
Log in
Register
Install the app
Install
Forums
Archive
Archive
Java
An enum mystery solved
JavaScript is disabled. For a better experience, please enable JavaScript in your browser before proceeding.
You are using an out of date browser. It may not display this or other websites correctly.
You should upgrade or use an
alternative browser
.
Reply to thread
Message
[QUOTE="Roedy Green, post: 623294"] I was baffled why the compiler would not let enum constructors access the enum's static variables. I consider it a bug, but an understandable bug. I think the reason is the enum invokes the constructors for the enum constants in static init code. Somebody was worried that the static initialisation would not be complete. Yet it is quite safe since the enum constants are the last bit of static init. [/QUOTE]
Verification
Post reply
Forums
Archive
Archive
Java
An enum mystery solved
Top