Win a copy of The Java Performance Companion this week in the Performance forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Abstract class vs Interface

 
Rajiv Chelsea
Ranch Hand
Posts: 88
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 5575
Eclipse IDE Java Windows XP
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
this topic discussed here many times. please search here ....
 
Rob Spoor
Sheriff
Pie
Posts: 20550
57
Chrome Eclipse IDE Java Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
We even have an FAQ entry on it.
 
Rajiv Chelsea
Ranch Hand
Posts: 88
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I need a real life example....
 
Paul Sturrock
Bartender
Posts: 10336
Eclipse IDE Hibernate Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Did you look at the FAQ or search? Many, many examples have been provided in the past.
 
Campbell Ritchie
Sheriff
Pie
Posts: 49430
62
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You have already been told to search. You might have found this.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic