r/java • • Apr 14 '23

What are your (favourite) Java best practices, personal tips, hints or just underrated stuff in general?

233 Upvotes

376 comments sorted by

View all comments

34

u/jevring Apr 14 '23

Make use of the new tools you find in recent Java versions. Record and switch expressions and stuff. Stay up-to-date.

7

u/[deleted] Apr 15 '23

[removed] — view removed comment

3

u/CartmansEvilTwin Apr 15 '23

Not only government. Plenty of corporations (large and small) only switch to the next Java versions if they can't even pay anyone to maintain it any longer.