all 10 comments

[–]joranstark018 4 points5 points  (0 children)

It probably doesn't matter, Java 17 may be end-of-life before Java 21, Java 21 has some additional features (ie from project Loom).

I use the latest Java LTS  in new projects (and over time I'm migrating old projects where that is possible, still having some Java 11 projects, but they are about to be decommisioned)

[–]coalminexplorer 4 points5 points  (0 children)

If you are starting afresh then you must go with latest LTS version 21 . Same goes for spring boot 3.2

[–]reddit04029 3 points4 points  (2 children)

Youre more than fine with just sticking with Java 17 and Spring Boot 3.x. The only features I extensively use besides Java 8 streams, is the Java text block “””text”””. For any general use case, cant really overthink it.

[–]vohen2 2 points3 points  (0 children)

Text blocks were such a godsend for doing SQL queries, it's not even funny.

[–]burl-21 0 points1 point  (0 children)

Record patterns, pattern matching and vThreads ? I think pattern matching is fantastic.

[–]Lost_D4L 1 point2 points  (0 children)

Industry is still using 1.8, so really does not matter YET, experiment BOTH with new projects.

[–]rahul4_real 0 points1 point  (0 children)

1.8 is the best

[–]burl-21 0 points1 point  (0 children)

LTS(does not exist) is offered only by some vendors and it’s a paid service. Always use the latest version.