posted 24 years ago
Hi !!
i am not 100% sure , but i think this is the ans:
i tried putting an add method in both Parent & Test , then the Test method is invoked, what it means is :
if u refer variables , then corresponding variables will only be accessed i.e if u say
Parent p = new Test() , & access p.i, where i is a variable
the value in Parent.i is printed not the child &
if u call a method say add which is both Parent & also in Test
and if u write
Parent p = new Test() & if u call
p.add()then the Test add is called.
hope this is clear...
Regards,
Preeti Pathak