Down casting: The concept of collecting Child object address back to Child type reference variable from Parent type. By assigning Child object address into Child type variable, we can access the complete functionality of Parent …
Object casting: Conversion of data from one type to another type at runtime is called casting. We have discussed primitive data casting in datatypes concept. Conversion of Object in Parent Child relation is called Object …
Runtime polymorphism: It is called Dynamic binding. It is Method overriding technique. Defining a method in the Child class with the same name and same signature of its Parent class. We can implement Method overriding …
Compile time polymorphism: It is also called static binding. It is method overloading technique. ‘Method overloading’ refers defining more than one method with the same name but with different signature(arguments). Method overloading can be implemented …
Polymorphism: It is the concept of defining an Object (class) that shows different behavior (methods) with the same Identity. “Poly” means “Many” “Morphism” means “Forms” Java supports… Compile time polymorphism Runtime polymorphism
Multiple inheritance: A class can extends only one class in java. An interface can extends number of interfaces in java. More than one extension is called “multiple inheritance”. Question: Can’t we implement interface without using …
Relations among class, abstract class & interface: A class can extends another class A class need to implements interface An interface extends another interface All relations among class, abstract class and interface as follows. A …