Which among the following is best situation to use upcasting?
- For general code dealing with only subtype
- For general code dealing with only supertype
- For general code dealing with both the supertype and subtype
- For writing a rigid code with respect to subtype
(b).For general code dealing with only supertype
need an explanation for this answer? contact us directly to get an explanation for this answer