Win a copy of Functional Reactive Programming this week in the Other Languages forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

extend with implements

 
Ritesh raushan
Ranch Hand
Posts: 101
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
class Horse extends Animal implements Elephant....

why we write first extends after implements...
 
Jeff Verdegan
Bartender
Posts: 6109
6
Android IntelliJ IDE Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Bartender
Posts: 825
5
Java Python Ruby
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Declaring Classes
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic