chapter 4 question abut casting/conversion
Suppose Employee inherits from Person and Manager inherits from Employee, and given the code:
Manager dan = (Manager)(new Employee())
Isnât it correct that this will compile, but will cause an exception at runtime?
|