I have my next question. I have extended a class, Parrent and overridden one of its method in the Child class. I tried to cast the type to the supercla
Parrent
Child
Here the child method gets called because functions are bind at runtime and in your reference memory is of child
((Parrent) new Child()).test();// new Child() means memory is of child