Whether for validation, preparation, or splitting and sharing arguments, it can be quite annoying that Java doesn't allow statements before the `super(...)` or `this(...)` call in a constructor. Luckily Java 22 is about to change that with JEP 447, which previews statements before the explicit constructor invocation.
JEP 447: [ Ссылка ]
JDK 22: [ Ссылка ]
~~~ Chapters ~~~
0:00 Intro
1:40 Constructor Chaining
2:57 No Statements Before Constructor Invocation
5:04 JEP 447
6:40 Prologue Benefits
7:46 COWS!
Tags: #Java #OpenJDK
Ещё видео!