Follow Field Naming Conventions
-
Non-public, non-static field names start with m.
-
Static field names start with s.
-
Other fields start with a lower case letter.
-
Public static final fields (constants) are ALL_CAPS_WITH_UNDERSCORES.
- 非公有、非静态域的变量以m开头(其实就是protected和private成员变量)
- 静态变量以s开头
- 其它变量以小写字母开头
- Public static final变量(常量)以下划线连接全大写ALL_CAPS_WITH_UNDERSCORES
For example:
public class MyClass {
public static final int SOME_CONSTANT = 42;
public int publicField;
private static MyClass sSingleton;
int mPackagePrivate;
private int mPrivate;
protected int mProtected;
}