aspose file tools*
The moose likes Developer Certification (SCJD/OCMJD) and the fly likes a question about interface Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Certification » Developer Certification (SCJD/OCMJD)
Bookmark "a question about interface" Watch "a question about interface" New topic
Author

a question about interface

Gerenne Vives
Ranch Hand

Joined: Feb 05, 2005
Posts: 60
Hello i have a doubt about the interface in the assignament UrlyBird , my questions are the following:

-Can I modified the interface or add methods??

-Can I create a interface that extends to the interface DB , and the class
data implemenst the interface that extends instead of DB .(This is because I want add two methods , and if I create a new interface , I can create this methods and in this interface and extends to the DB .)

thank in advance.
Frans Janssen
Ranch Hand

Joined: Dec 29, 2004
Posts: 357
Hi Irene,

-Can I modified the interface or add methods??

No, you can't do that.

-Can I create a interface that extends to the interface DB , and the class data implemenst the interface that extends instead of DB .(This is because I want add two methods , and if I create a new interface , I can create this methods and in this interface and extends to the DB .)

Yes, that would be allowed.

thank in advance.

You're welcome!

Frans.


SCJP 1.4, SCJD
Charlie Goth
Ranch Hand

Joined: Feb 26, 2004
Posts: 60
No, you can't change the interface.

Yes, you extend from the interface and implement that. Or you could just add methods to the class and not bother with the extra interface.

Charlie


SCJP (77%)
Gerenne Vives
Ranch Hand

Joined: Feb 05, 2005
Posts: 60
ok, thanks .
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: a question about interface
 
Similar Threads
design problem
get all records in GUI in B&S
a question about SCJD
RMI and Adapter Pattern for URLyBird
B&S 2.1.2 Interface