Question 7 in Marcus's exam3
Which of the following statements are true?
1) An interface can only contain method and not variables
2)
Java does not allow the creation of a reference to an
interfacewith the new keyword.
3) A class may extend only one other class and implement only
one interface
4) Interfaces are the Java approach to addressing the single
inheritancemodel, but require implementing classes to create the
functionality ofthe Interfaces.
The answer is 4.
I thought Interfaces are the Java approach to addressing the
multiple inheritancemodel.Java can't support extending more than
one class but it supports implementing more than one interface .
Aren't we making multiple inheritance possible through
interfaces???
Could somebody please clarify regarding that fourth option in the
above question.
Thanks.