Help coderanch get a
new server
by contributing to the fundraiser

Zafar Iqbal

Greenhorn
+ Follow
since Feb 27, 2001
Merit badge: grant badges
For More
Cows and Likes
Cows
Total received
0
In last 30 days
0
Total given
0
Likes
Total received
0
Received in last 30 days
0
Total given
0
Given in last 30 days
0
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by Zafar Iqbal

Hi people.
sorry to disturb you.
I has seen what you have posted. Lastly one of u asked that is
a is an instanceof Agg or Base.
sure it is instanceof both. but as the base class is matched first so it will not provide the related function. if you have dereferenced the *a* to Agg by casting then it will give you the function of Agg, unless you have not overridden the Base class methods. If Base class had defined or declared any of these method then it would have been possible to call in this manner.
a.getField()
but in your scenario you must do it in the following way.
((Agg)a).getField()
Thanx
And inform me if I am wrong.
23 years ago