This week's book giveaway is in the OCAJP 8 forum.
We're giving away four copies of OCA Java SE 8 Programmer I Study Guide and have Edward Finegan & Robert Liguori on-line!
See this thread for details.
The moose likes Beginning Java and the fly likes Abstract class vs Interface Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of OCA Java SE 8 Programmer I Study Guide this week in the OCAJP 8 forum!
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "Abstract class vs Interface" Watch "Abstract class vs Interface" New topic
Author

Abstract class vs Interface

Rajiv Chelsea
Ranch Hand

Joined: Jun 15, 2010
Posts: 88
Hi

I want to know when to use an Abstract class and when to go for an interface?

Some real examples differentiating the use of two
would be very helpful?

I mean which is better in a particular scenario..
Seetharaman Venkatasamy
Ranch Hand

Joined: Jan 28, 2008
Posts: 5575

this topic discussed here many times. please search here ....
Rob Spoor
Sheriff

Joined: Oct 27, 2005
Posts: 20131
    
  30

We even have an FAQ entry on it.


SCJP 1.4 - SCJP 6 - SCWCD 5 - OCEEJBD 6 - OCEJPAD 6
How To Ask Questions How To Answer Questions
Rajiv Chelsea
Ranch Hand

Joined: Jun 15, 2010
Posts: 88
I need a real life example....
Paul Sturrock
Bartender

Joined: Apr 14, 2004
Posts: 10336

Did you look at the FAQ or search? Many, many examples have been provided in the past.


JavaRanch FAQ HowToAskQuestionsOnJavaRanch
Campbell Ritchie
Sheriff

Joined: Oct 13, 2005
Posts: 44522
    
  34
You have already been told to search. You might have found this.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Abstract class vs Interface
 
It's not a secret anymore!