I have two classes(not interface).
Suppose the classes be class A and class B.
I want to know which is more efficient and correct implementation.
I want to access the method of A from B.
Two ways: 1) class B extends A (inherits) 2) In class B: create an object/instance of Class A, and then access the method of class A.
Which one is more efficient and correct ??