In an interview I was asked the below question.
Let say there is class A with a method drawShape() and there is another class B with a method drawSquare().
Now there is a third class C that extends both A and B.
Now finally in my class C I want both these methods.
How do I get both these methods at same time?
Do not you extends because Java does not suppert , instead you can use interface: