Instance variables should be used sparingly, and they should
never be public. When necessary, provide methods to
allow the user of a class to access or modify internal data.
Use descriptive names. If you are working on a program that
simulates a bank account, balance is a good name (if the
quantity is actually a balance!), while b or
boris are not. For the most part, one-character names
are appropriate only when they are used locally within a
very small block of code.
The convention in Java is to use all lowercase for variable
and method names. Class names begin with an uppercase letter, and
constants (indicated by static final) are all uppercase.
When a name is a "compound word," the second and subsequent
words begin with an uppercase letter. Examples:
ArrayList, binarySearch, hashCode.