difference between is-a relationship and has-a relationship in java code example
Example 1: is a and has a relationship in java
class Room {
Table table = new Table();
}
Example 2: is a and has a relationship in java
class Apple extends Fruit {
}