What is the difference between up-casting and down-casting in Java?



Converting a subclass type to a superclass type is known as up-casting.

Converting a superclass type to a subclass type is known as down-casting.

Monica Mona
Monica Mona

Student of life, and a lifelong learner


Advertisements