Posts

Showing posts with the label upcasting

Java upcasting and Downcasting

Image
                      Upcasting  and Downcasting    Upcasting The process of adding a sub-class object to a super-class reference variable is called upcasting . A    a = new B();      Downcasting   The process of getting a sub-class object  placed in a  super         class variable back to the same sub-class reference is called downcasting . B b = (B) a ; For additional information 👇