Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

JEP 445: Unnamed Classes and Instance Main Methods

Released in Java 21

https://openjdk.org/jeps/445



It's a shame that they only introduced this as a feature only for single-file programs.

It would make Java a much better language in my eyes if it allowed package-level methods, or even multiple records/classes per file. But apparently "impact on how Java code is written in general" is not wanted.


People change their minds once they get used to something. There's reason to have patience.


:-) So not even remotely dead.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: