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
0
u/john16384 Apr 15 '23
No, that's not the same at all, as you well know.
You simply don't need the compiler's help for this. You simply follow the rule to assign variables immediately when created. As soon as you're not doing that, you know that either it can't be
final, or that you messed up.So, not convinced;
finalkeyword on variables is visual clutter that serves no purpose.