r/learnjava • • May 06 '21

What are the most groundbreaking Java features since Java 8, and why?

All the features from Java 9-16 will all fit a use case, but I'd love to make time to go through every one of them, but I need to prioritize, or maybe I underestimated one of them.

If you've had a work scenario where they helped, that'd be great too.

You tell me! 🙂

52 Upvotes

11 comments sorted by

View all comments

11

u/JazzyandSaxy May 06 '21

The var keyword might not be "groundbreaking" but if you learn the nuances of it, it can really be convenient in some situations especially with super long classnames. Check it out, it's not too complicated to figure out.

0

u/Migeil May 06 '21

What do you mean by nuances?

8

u/sweetno May 06 '21

var var = "var";

4

u/JazzyandSaxy May 06 '21

Rules of when you can use them, how they work behind the scenes, etc. (Ex. They are assigned a type at compile-time and it cannot be changed, can only be used as a local variable, etc.)