
Define instance variables
for the data that all objects
will have in common.
SOFTWARE
ENGINEERING TIP
Use nouns for identifier
names for instance vari-
ables.Begin the identifier
with a lowercase letter and
capitalize internal words.
SOFTWARE
ENGINEERING TIP
7.3 Writing Class Methods 375
The data type of an instance variable can be any of Java’s primitive types or
a class type.
The identifierList consists of one or more names for instance variables of
the same data type and can optionally assign initial values to the instance
variables. If more than one instance variable name is given, a comma is
used as a separator. By convention, identifier names for instance ...