ref: https://openjdk.org/jeps/8338287
Summary
In constructors in the Java programming language, allow statements to appear before an explicit constructor invocation, i.e., super(..) or this(..). The statements cannot reference the instance under construction, but they can initialize its fields. Initializing fields before invoking another constructor makes a class more reliable when methods are overridden. This is a preview language feature.
History
This feature was originally proposed by JEP 447, and delivered as a preview feature in JDK 22.
ref: https://openjdk.org/jeps/8338287 Summary In constructors in the Java programming language, allow statements to appear before an explicit constructor invocation, i.e., super(..) or this(..). The statements cannot reference the instance under construction, but they can initialize its fields. Initializing fields before invoking another constructor makes a class more reliable when methods are overridden. This is a preview language feature.
History This feature was originally proposed by JEP 447, and delivered as a preview feature in JDK 22.
JEP 482 support captured in jdt.core issue #2472