Downcasting is _______________________

Ngô Quốc Huy

New member
Downcasting is _______________________
A. Always safe
B. Never safe
C. Safe sometimes
D. Safe, depending on code
 
Answer: b
Explanation: The downcasting concept is made for exception cases. When there is a need to represent an entity in the form which is not suitable for it. Representing a base type in derived type is not right but can be done for special cases.
 

Tìm kiếm

Back
Top