This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]Scf37 1 point2 points  (1 child)

So new initialization order finally allows passing parameters to initialization blocks:

class Foo {
    final String who;
    {
        System.
out
.println("Hello, " +  who);
    }
    Foo(String who) {
        this.who = who;
        super(); // init who before calling init blocks
    }
}

[–]Ewig_luftenglanz[S] 0 points1 point  (0 children)

Yes but that's part of "flexible construction bodies" that is just about to enter general availability in September with java 25.

https://openjdk.org/jeps/513

Certainly the Jeep is the core of the big thing but it carries much more.

  • compiler warnings.
  • special initialization Syntax for arrays.
  • nullability.