Answers for "java how to upcast"

1

upcasting in java

Upcasting is a type of object typecasting in which a child object is typecasted to a parent class object. By using the Upcasting, we can easily access the variables and methods of the parent class to the child class. Here, we don't access all the variables and the method. We access only some specified variables and methods of the child class. Upcasting is also known as Generalization and Widening.
Posted by: Guest on August-24-2021

Browse Popular Code Answers by Language