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: openjdk.org/jeps/447
JDK 22: jdk.java.net/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
Негізгі бет Ғылым және технология Java 22 Previews Statements Before `super(...)` and `this(...)` - Inside Java Newscast #62
Пікірлер: 26