Multivision interview question

Q: You have Class A with Method/Function A, which returns "Hello", and Class B. How can you make Class B have the same method A that returns "Hello"?

Interview Answer

Anonymous

13 Oct 2015

In brief, make Class B inherit from Class A ("B extends A" in Java).