A.foo() Sent from my iPhone 4
On 23 Dec 2010, at 06:35, hari ks <hari_...@yahoo.com> wrote: > I have put up a post here : > http://programparadigm.blogspot.com/2010/12/method-overriding-enhancements-strong.html > > > Suppose class B extends A. > A a = new B(); > ((A)a).foo(); // still calls class B's foo() method. > > Can something like "a.super.foo();" method invocation be made possible. Or > ((A > strong)a).foo(); should call A's foo() method with B's instance data. > > similar thing for C++. > > Is there a way to already do this? > > thanks & regards, > Hari > > >