This week's book giveaway is in the Mac OS forum.
We're giving away four copies of a choice of "Take Control of Upgrading to Yosemite" or "Take Control of Automating Your Mac" and have Joe Kissell on-line!
See this thread for details.
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
Author

Interfaces

Fitz Herbert
Greenhorn

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
 
GeeCON Prague 2014
 
subject: Interfaces