File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Beginning Java and the fly likes Interfaces Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "Interfaces" Watch "Interfaces" New topic


Fitz Herbert

Joined: Mar 22, 2003
Posts: 21
A question I need some straight answers for my text books are sending me up the creek!!! Q1 Is an interface inherited? I have no reasoning for interfaces not being inhertited?
Thank you dearly
Michael Morris
Ranch Hand

Joined: Jan 30, 2002
Posts: 3451
Hi Fitz,
Welcome to JavaRanch. If a class implements an interface then all subclasses that extend that class inherit the implementation. For example:

One other point here is that a subinterface will inherit all the methods of its superinterface:

So a class that implements BabyFooey must define both someMethod and someOtherMethod or declare itself abstract.

Any intelligent fool can make things bigger, more complex, and more violent. It takes a touch of genius - and a lot of courage - to move in the opposite direction. - Ernst F. Schumacher
I agree. Here's the link:
subject: Interfaces
jQuery in Action, 3rd edition