![]() |
Sponsored Link •
|
Advertisement
|
Advertisement
|
This page contains an archived post to the Java Answers Forum made prior to February 25, 2002. If you wish to participate in discussions, please visit the new Artima Forums.
Message:
Of course, memory is aloocated for private variables in ancestor when an object of descendant is created. However, you cannot refer to a private variable in ancestor using super in descendant. The correct way to using the private variables from ancestor is to provide pulic methods in ancestor which will return the private variable. For example, class Ancestor { class Derived extends Ancestor { Replies: |
Sponsored Links
|