Polymorphism After Overriding a method of a super-class in a sub-class, Upcasting it, and running the sub-class method through a super-class reference is called polymorphism.
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 👇