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 Java in General and the fly likes Abstract class and interface... Superclass Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

JavaRanch » Java Forums » Java » Java in General
Bookmark "Abstract class and interface... Superclass" Watch "Abstract class and interface... Superclass" New topic

Abstract class and interface... Superclass

Larry Lai
Ranch Hand

Joined: May 13, 2002
Posts: 44
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?
Barry Gaunt
Ranch Hand

Joined: Aug 03, 2002
Posts: 7729
Homework Help No, Java Tutorial Yes

Ask a Meaningful Question and HowToAskQuestionsOnJavaRanch
Getting someone to think and try something out is much more useful than just telling them the answer.
I agree. Here's the link:
subject: Abstract class and interface... Superclass
It's not a secret anymore!