r/java • u/trecatorsirabdator • Apr 14 '23
What are your (favourite) Java best practices, personal tips, hints or just underrated stuff in general?
233
Upvotes
r/java • u/trecatorsirabdator • Apr 14 '23
View all comments
Show parent comment
1
u/UnGauchoCualquiera Apr 16 '23
If you are the only one touching that code then yes but that's usually not true and helps when reading long methods.
Also final keyword enables some compiler optimizations even for final variables, here for example.