This week's book giveaway is in the Java in General forum.
We're giving away four copies of Think Java: How to Think Like a Computer Scientist and have Allen B. Downey & Chris Mayfield on-line!
See this thread for details.
Win a copy of Think Java: How to Think Like a Computer Scientist this week in the Java in General 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