Upcasting

Upcasting refers to the process of converting a reference variable of a base class type to a reference variable of a derived class type. This allows for accessing the methods and fields of the derived class using the reference variable of the base class. Upcasting is a fundamental concept in object-oriented programming and is essential for achieving polymorphism in languages such as Java and C++.




Related Categories

Upcasting