This week's book giveaway is in the OO, Patterns, UML and Refactoring forum. We're giving away four copies of Refactoring for Software Design Smells: Managing Technical Debt and have Girish Suryanarayana, Ganesh Samarthyam & Tushar Sharma on-line! See this thread for details.
Hi: I have an ancestor class Top with a private int "i" (say 5) and a public getValue() function that returns the integer value "i"; I created a descendant class Next from the above class and re-declared and initialized a private integer variable "i" (say to 10). But no new getValue() function here, as it is inherited from the ancestor. My question is how can i get to print the value of integer i in the Next class (10), without Overriding the getValue() method from class Top. Is it possible to get 10 to print, other than directly accessing the variable or using a getValue() method at class Next? Thanks Madan //Top.java
[This message has been edited by Cindy Glass (edited October 05, 2001).]