6
Which Java features do you use?
(forms.office.com)
We once had a project of 8 years old. You could find any pattern and anti-pattern in there, starting from java 1.5. I hope that none will say the same about my codebase in a few years. ๐
I try to follow clean code as much as possible and not overdoing the new features, but only there, where it makes sense.
If I had to go with the ternary operator, I would choose not to negate the statement for the sake of readability.
If I had free will of choice I would prefer using the Optionals API, like @MagicShel@programming.dev did.
I wanted to recommend this book to some of my colleagues; however, I now have some doubts. ๐คฃ๐๐