aspose file tools*
The moose likes Programmer Certification (SCJP/OCPJP) and the fly likes K & B SCJP5 Page77 Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Certification » Programmer Certification (SCJP/OCPJP)
Bookmark "K & B SCJP5 Page77" Watch "K & B SCJP5 Page77" New topic
Author

K & B SCJP5 Page77

Ruwan Nanayakkara
Greenhorn

Joined: Oct 10, 2008
Posts: 1
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?

/Ruwan.
Lucas Smith
Ranch Hand

Joined: Apr 20, 2009
Posts: 804
    
    1

Please, post the question.


SCJP6, SCWCD5, OCE:EJBD6.
BLOG: http://leakfromjavaheap.blogspot.com
Ankit Garg
Sheriff

Joined: Aug 03, 2008
Posts: 9302
    
  17

Hi Ruwan, welcome to javaranch.

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)...


SCJP 6 | SCWCD 5 | Javaranch SCJP FAQ | SCWCD Links
Deepak Bala
Bartender

Joined: Feb 24, 2006
Posts: 6661
    
    5

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?

/Ruwan.


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.


SCJP 6 articles - SCJP 5/6 mock exams - More SCJP Mocks
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: K & B SCJP5 Page77