padhle

Inheritance : Composition and aggregation or Has a relationship in OOPS Java

Inheritance :Has a relationship in OOPS Java 1) Has-a- relationship is also known as composition or aggregation 2) No specific keyword is there to implement has a relationship. 3) Its advantage is that it is helpful in code re-usability. Lets understand the Has a relationship with a Java code example : Here we have 4 …

Inheritance : Composition and aggregation or Has a relationship in OOPS Java Read More »

Inheritance in Java or Is a relationship in Java : Tutorial and Interview Question

Inheritance is one of OOPS concept in Java where child class inherits the method of parent class. It emphasize on the res-usability of the code. some facts about Inheritance 1) Inheritance is implements by extends keyword in java. 2) Inheritance make the re-usability of code ie child class can access the methods of parent class …

Inheritance in Java or Is a relationship in Java : Tutorial and Interview Question Read More »