is a relationship in java

Solutions on MaxInterview for is a relationship in java by the best coders in the world

showing results for - "is a relationship in java"
Raphael
30 Feb 2018
1‘is a’ relationship is also known as inheritance. We can implement 
2‘is a’ relationship or inheritance in java using extends keyword. 
3The advantage of inheritance or is a relationship is reusability of code 
4instead of duplicating the code.
5  
6Ex : 
7Motor cycle is a vehicle
8Car is a vehicle 
9Both, car and motorcycle extends vehicle.