Unnamed Classes with Initializers
Jim Laskey
james.laskey at oracle.com
Tue Jul 4 13:53:04 UTC 2023
That statement was left in error and has now been removed,
On Jul 4, 2023, at 10:17 AM, David Alayachew <davidalayachew at gmail.com> wrote:
Hello Brian,
Thank you for your response!
Maybe me and Wesley are somehow wildly misreading the JEP, but here is a copy-and-paste. -- https://openjdk.org/jeps/445
"An unnamed class is almost exactly like an explicitly declared class. Its members can have the same modifiers (e.g., private and static) and the modifiers have the same defaults (e.g., package access and instance membership).
**The class can have static initializers as well as instance initializers.**
One key difference is that while an unnamed class has a default zero-parameter constructor, it can have no other constructor."
Are we misreading this JEP?
Thank you for your time and help!
David Alayachew
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mail.openjdk.org/pipermail/amber-dev/attachments/20230704/6f50965a/attachment-0001.htm>
More information about the amber-dev
mailing list