Multiple choice technology programming languages

Is typecasting is allowed between two different objects of different classes???

  1. True

  2. False

Reveal answer Fill a bubble to check yourself
B Correct answer
Explanation

Typecasting between objects of different classes is only allowed if they are in the same inheritance hierarchy (parent-child relationship). You cannot cast between completely unrelated classes.