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

Oct 13, 2015

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