SE450
:
Programming Style: Fields
[52/53]
Some programmers put fields before methods:
public class Greeter
{
private String name;
public Greeter(String aName) { . . . }
. . .
}
From OO perspective, it is better to list the
public
interface first
All fields should be
private
Don't use default (package) visibility