Question: what is the difference between isa and hasa relationship in java?
Answer: An IS-A relationship is inheritance. The classes which inherit are known as sub classes or child classes. On the other hand, HAS-A relationship is composition. ... So you will create a class room and then in that class create an instance of type table.