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 Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "Abstract class vs Interface" Watch "Abstract class vs Interface" New topic

Abstract class vs Interface

Rajiv Chelsea
Ranch Hand

Joined: Jun 15, 2010
Posts: 88

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

Joined: Oct 27, 2005
Posts: 19649

We even have an FAQ entry on it.

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

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

Joined: Oct 13, 2005
Posts: 37907
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
Similar Threads
difference between interface and abstract
Abstract Class & Interface
abstract class vs interface ?
Difference between abstract class and interface
use of abstact class and interface