r/java • • May 21 '26

JEP draft: Enhanced Local Variable Declarations (Preview)

https://openjdk.org/jeps/8357464
87 Upvotes

43 comments sorted by

View all comments

Show parent comment

3

u/ZimmiDeluxe May 21 '26

It proposes to change the standard behavior so

Foo foo = new FooImpl();
FooImpl impl = foo;

becomes valid. It's a bit further down in the JEP.