ASWEB - Avoid Statements With Empty Body
As far as possible avoid statements with empty body.
Wrong
String s;
for( s = ""; st.countTokens() > 2;
s = s + st.nextToken() );
Tip:
Provide statement body or change the logic of the program
(for example, use while statement instead of for statement)
Right
String s = "";
while( st.countTokens() > 2 ) {
s += st.nextToken();
}