Fields should be declared at the top of the class, before any method declarations, constructors, initializers or inner classes. Example:
public class HelloWorldBean { // Field declared before methods / inner classes - OK private String _thing; public String getMessage() { return "Hello World!"; } // Field declared after methods / inner classes - avoid this private String _fieldInWrongLocation; }
This rule is deprecated, use {rule:squid:S1213} instead.