Ok. Thats fine. But my question is , compiler sees that test method return type is "int". But there is no "return" statement gets called here. So Why compiler doesn't say like "return statement is missing" ?
My question is - What exactly Object 'a' will be containing internally? why a.f() executes 'class B' s method and why 'a.sub()' gives an error ? In short what is the internal structure of object 'a' in this case ?