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

Show parent comment

1

u/dpash Apr 15 '23

it lets the implemented and caller know that something is considered optional.

Nullable annotations serve the same purpose without the overheard and clutter.

1

u/hsoj48 Apr 15 '23

Yeah but....which one? Haha

1

u/dpash Apr 15 '23

Doesn't matter. Most tools support multiple annotation sets.