JDK-8314447 : Release Note: Unnamed Classes and Instance Main Methods (Preview)
  • Type: Sub-task
  • Component: specification
  • Sub-Component: language
  • Affected Version: 21
  • Priority: P4
  • Status: Resolved
  • Resolution: Delivered
  • Submitted: 2023-08-16
  • Updated: 2023-08-29
  • Resolved: 2023-08-18
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
JDK 21
21Resolved
Description
Unnamed classes and instance main methods enable students to write streamlined declarations for single-class programs and then seamlessly expand their programs later to use more advanced features as their skills grow. Unnamed classes allow the user to provide class content without the full ceremony of the class declaration. The instance main method feature allows the user to drop the formality of `public static void main(String[] args)` and simply declare `void main()`.