InterviewSolution
Saved Bookmarks
| 1. |
Which among the following is the best situation to use upcasting?(a) For general code dealing with only subtype(b) For general code dealing with only supertype(c) For general code dealing with both the supertype and subtype(d) For writing a rigid code with respect to subtypeThe question was posed to me in an interview for job.This is a very interesting question from Upcasting in section Default Arguments vs Overloading, Upcasting and Downcasting of Object Oriented Programming |
|
Answer» Right answer is (b) For general code DEALING with only supertype |
|