DEV Community

Discussion on: Java Inheritance Puzzle

Collapse
 
jrtibbetts profile image
Jason R Tibbetts

1. It doesn't matter whether superType is cast as DefaultSuperType, because it's still a ChildOfSuperType, and the function dispatch table will still point to ChildOfSuperType.test().