Regarding Parent obj2=new Child()

in this prob. Mam’s output while using obj2.fun() comes on the basis of Child class. But in Eclipse of my system output comes on the basis of Parent class. Please tell me what is right or what is wrong.

I don’t think that should be possible brother, since this is a very central concept of polymorphism. It’s got nothing to do with your IDE. Anyways, please post your code