This week's book giveaway is in the OCAJP 8 forum. We're giving away four copies of OCA Java SE 8 Programmer I Study Guide and have Edward Finegan & Robert Liguori on-line! See this thread for details.
Ruwan Nanayakkara wrote:Is there a rule saying if interface2 implements interface1, Interface2 should implement all the the methods in Interface1.
I think you are not using the correct vocabulary. An interface extends another interface. Also an interface cannot implement methods. So if you are trying to say that if interface2 extends interface1 then any class implementing interface2 must give implementation of all the methods of interface1 and interface2 (otherwise that class will be abstract)...
Ruwan Nanayakkara wrote:Hi guys
I need a clarification with the answeres given for the Self Test Question 1 on page 77.
It says that Answer 'A'. is incorrect because 'interface don't implement anything'.
Is there a rule saying if interface2 implements interface1, Interface2 should implement all the the methods in Interface1.
I couldn't find the page on chapter1 which explains this theory.
can someone explain this please?
You can give this a try by writing 2-3 interfaces on your own and trying to implement them with a concrete class / abstract class.