Which Among The Following Is The Best Situation To Use Upcasting #1219
Which among the following is the best situation to use upcasting?
This multiple choice question (MCQ) is related to the book/course gs gs111 OOP Object Oriented Programming Java. It can also be found in gs gs111 Default Arguments vs Overloading, Upcasting and Downcasting - OOPs MCQ: Upcasting - Quiz No.1.
Which among the following is the 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