An attribute is another term for a field. It's typically a public constant or a public variable that can be accessed directly.
Attributes (Fields)
–
instance variables and static variables (we'll define static later)
–
Instance variables
–
variables defined in the
class and given a value in each
object
Attributes(Fields) can be:
–
any primitive data type (int, double, String etc.)
–
objects of the same or another class
|