Start of Tutorial > Start of Trail > Start of Lesson |
Search
Feedback Form |
Within a class, a member variable that has the same
name as a member variable in the superclass hides the
superclass's member variable, even if their types are
different. Within the subclass, the member variable in
the superclass cannot be referenced by its simple name.
Instead, the member variable must be accessed through
super
, which is covered in the next section.
Generally speaking, we don't recommend hiding member variables.
Start of Tutorial > Start of Trail > Start of Lesson |
Search
Feedback Form |
Copyright 1995-2005 Sun Microsystems, Inc. All rights reserved.