Home > DeveloperSection > Interviews > Can you explain about Upcasting and Downcasting in Java ?

Posted on    July-03-2015 12:26 AM

 Java Java 
 1 Answer(s)
  605  View(s)
Rate this:

Mayank Tripathi
Mayank Tripathi

Total Post:807

Posted on    July-03-2015 12:26 AM

Upcasting : Casting a Sub class to Super class. Upcasting is called as widening.
Downcasting : Casting a Super class to Sub class. Downcasting is called as narrowing.

Don't want to miss updates? Please click the below button!

Follow MindStick