This week's book giveaway is in the OO, Patterns, UML and Refactoring forum.
We're giving away four copies of Refactoring for Software Design Smells: Managing Technical Debt and have Girish Suryanarayana, Ganesh Samarthyam & Tushar Sharma on-line!
See this thread for details.
The moose likes Beginning Java and the fly likes extend with implements Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

JavaRanch » Java Forums » Java » Beginning Java
Bookmark "extend with implements" Watch "extend with implements" New topic

extend with implements

Ritesh raushan
Ranch Hand

Joined: Aug 29, 2012
Posts: 100
class Horse extends Animal implements Elephant....

why we write first extends after implements...
Jeff Verdegan

Joined: Jan 03, 2004
Posts: 6109

It's not clear what you're asking.

Are you asking why we use both extends and implements? If that's your question, the answer is because this class extends another class and implements an interface.

Or are you asking about why it's in that order? If that's your question, then the answer is because that's the order the author happened to write it in, or perhaps because he had no choice because maybe the spec says it has to be in that order.
Kemal Sokolovic

Joined: Jun 19, 2010
Posts: 825

Declaring Classes

The quieter you are, the more you are able to hear.
Have you checked out Aspose?
subject: extend with implements
It's not a secret anymore!