Adding an 'init' keyword for initializers in Java
DLOzTOR
zafabar1 at gmail.com
Sun Mar 23 20:10:33 UTC 2025
I encountered a problem when I mistakenly wrote a method without a name and
it was perceived as an initializer, to avoid such cases I want to suggest
adding a keyword for declaring initializers.
Something like this:
class Example {
init {}
static init {}
}
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mail.openjdk.org/pipermail/jdk-dev/attachments/20250323/b58a7f91/attachment.htm>
More information about the jdk-dev
mailing list