Win a copy of Re-engineering Legacy Software this week in the Refactoring forum
or Docker in Action in the Agile forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Difference Between Abstract and Interface

 
Maheswaran Devaraj
Ranch Hand
Posts: 47
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi All,

I want to know where we have to use abstract class and where we have to use the Interface.

Regards,
Maheswaran
 
Vijitha Kumara
Bartender
Posts: 3913
9
Chrome Fedora Hibernate
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
If you want to provide some/common implementations for certain behaviors you may use abstract classes whereas interfaces (being 100% abstract) you force the implemented class to implement the behavior. You may find lots of information by searching through the forums (java) here. And find this Sun tutorial which would be helpful.
 
Campbell Ritchie
Sheriff
Posts: 48394
56
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
"Maheswaran" please read the important administrative private message I just sent you.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic