adplus-dvertising
frame-decoration

Question

Which among the following is 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 subtype

Answer: (b).For general code dealing with only supertype

Engage with the Community - Add Your Comment

Confused About the Answer? Ask for Details Here.

Know the Explanation? Add it Here.

Q. Which among the following is best situation to use upcasting?