Synopsis: | Don't define methods with the same name as the class name |
Language: | Java |
Severity Level: | 3 |
Category: | Naming |
Description: |
It is very easy to confuse methods with class name with constructors. It is preferrable
to name these non-constructor methods in a different way.public class Foo { public void Foo() { // not a constructor, just a poorly named method } } |