Which among the following is safe?
(a) Upcasting
(b) Downcasting
(c) Both upcasting and downcasting
(d) If upcasting is safe then downcasting is not, and vice versa
I have been asked this question in unit test.
Asked question is from Upcasting in portion Default Arguments vs Overloading, Upcasting and Downcasting of Object Oriented Programming