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

Java 8Object Oriented ProgrammingProgramming

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.

raja
Published on 02-Jan-2018 07:01:46
Advertisements