
Begin variable names with
a lowercase letter.If the
variable name consists of
more than one word,begin
each word after the first
with a capital letter.Avoid
underscores in variable
names,and do not begin a
variable name with a dollar
sign.
SOFTWARE
ENGINEERING TIP
When selecting identifiers,
choose meaningful names
that reflect the use of the
identifier in the program;
this will make your code
self-documented.Use as
many characters as neces-
sary to make the identifier
clear,but avoid extremely
long identifiers.Also,for
clarity in your program
logic,avoid identifiers that
resemble Java keywords.
SOFTWARE
ENGINEERING TIP
46 CHAPTER 2 Programming Building Blocks—Java ...