r/java • • Aug 03 '25

Teach Me the Craziest, Most Useful Java Features — NOT the Basic Stuff

I want to know the WILD, INSANELY PRACTICAL, "how the hell did I not know this earlier?" kind of Java stuff that only real devs who've been through production hell know.

Like I didn't know about modules recently

393 Upvotes

279 comments sorted by

View all comments

Show parent comment

1

u/Cell-i-Zenit Aug 09 '25

but annotations are not compile safe (except you write an annotation processor, but that would be crazy tbh)

1

u/vegan_antitheist Aug 09 '25

Depends on the project. Often, you can use simple unit tests. You can write your own annotation processor, but it really isn't necessary when you have unit tests.