Win a copy of Re-engineering Legacy Software this week in the Refactoring forum
or Docker in Action in the Cloud/Virtualization forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Abstract class and interface... Superclass

 
Larry Lai
Ranch Hand
Posts: 44
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi everyone,

I've a homework execrise about that...

1. In what situation would we use an abstract class instead of an interface?

2. In what situation would we use an interface instead of an inheriting from a superclass?

3. When is it better to use an interface rather than an abstract class?

How to think that three kinds of keywords?
Thanks
Larry
 
Barry Gaunt
Ranch Hand
Posts: 7729
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Homework Help No, Java Tutorial Yes
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic