Synopsis: | An empty statement (semicolon) not part of a loop |
Language: | Java |
Severity Level: | 3 |
Category: | Basic |
Description: |
An empty statement (aka a semicolon by itself) that is not used
as the sole body of a for loop or while loop is probably a bug. It
could also be a double semicolon, which is useless and should be
removed.public class MyClass { public void doit() { // this is probably not what you meant to do ; // the extra semicolon here this is not necessary System.out.println("look at the extra semicolon");; } } |