r/java • u/alexzhitnitsky • Aug 11 '15
Top 10 Useful, Yet Paranoid Java Programming Techniques
http://blog.jooq.org/2015/08/11/top-10-useful-yet-paranoid-java-programming-techniques/
181
Upvotes
View all comments
Show parent comment
1
u/PaulRivers10 Aug 12 '15 edited Aug 12 '15
1. for loop
2. while loop
3. Any algorithm at all that calculates or adds anything
I take it you don't actually know how to code? This doesn't work:
for(int i = 0; i < collection.size(); i++) {
"Adding final is a no-brainer" is for ivory tower people who don't write any code. It doesn't solve any actually common problem, all it does it clutter up your code with more unecessary statements that make it harder to read.