I have the following:
public interface SuperbInterface public class A implements SuperbInterface public class B extends A public class C extends B
I want to create an instance of C , but I seem to get B , what did I do wrong?
Class classz = Class.forName("C"); SuperbInterface superb = (SuperbInterface)classz.newInstance(); //Here when I debug it seems to be going to B.doWork() methods instead of C.doWork(). superb.doWork();
Rosdi Kasim
source share