Skip to content

Commit 7bfb8fd

Browse files
committed
JDK 21: removed unnamed class initializers example (JEP were updated)
1 parent 2f17ac8 commit 7bfb8fd

2 files changed

Lines changed: 1 addition & 20 deletions

File tree

java-21/README.md

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -149,9 +149,8 @@ To run each example use: `java --enable-preview --source 21 <FileName.java>`
149149
* it can have:
150150
* instance and static methods
151151
* instance and static fields
152-
* instance and static initializers
153152
* the default modifers are the same (package access and instance membership)
154-
* the main difference is will only have an impliticy default zero-paramater constructor
153+
* the main difference is will only have an impliticy default zero-paramater constructor and cannot have initializers (static nor instance)
155154
* `Class.isSynthetic` method returns true
156155
* this JEPs introduces changes to how Java programs are launched:
157156
* instance main method:

java-21/UnnamedClassWithInitializers.java

Lines changed: 0 additions & 18 deletions
This file was deleted.

0 commit comments

Comments
 (0)