as well , if you know polimorhisam, about
Let's first understand the upcasting before Runtime Polymorphism.
Let's first understand the upcasting before Runtime Polymorphism.
Upcasting
When reference variable of Parent class refers to the object of Child class, it is known as upcasting. For example:
Like,
class a{}
class b extends a{}
then,
a obj = new b();//upcasting.
Comments
Post a Comment