CAN YOU EXPLAIN ABOUT UPCASTING AND DOWNCASTING IN JAVA ?

Mayank Tripathi

Total Post:807

Points:4035
Posted by  Mayank Tripathi
Java 
 647  View(s)
Ratings:
Rate this:
  1. Mayank Tripathi

    Post:807

    Points:4035
    Can you explain about Upcasting and Downcasting in Java ?

    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.

Answer

NEWSLETTER

Enter your email address here always to be updated. We promise not to spam!