File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
Win a copy of Soft Skills: The software developer's life manual this week in the Jobs Discussion forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Abstract Clas vs Interface

 
sahidul karim
Greenhorn
Posts: 28
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Give me some practical scenario where should i use interface and where i ll go for abstarct class.
 
Adeel Ansari
Ranch Hand
Posts: 2874
 
Jan Groth
Ranch Hand
Posts: 456
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
wrong forum mate...
 
Rahul Bhattacharjee
Ranch Hand
Posts: 2308
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
In layered programming go for interfaces.So that one team can make the layer with the interface without bothering about the implementation of that interface.
Abstract class is used to represent something in OO concept where someof the common implementation are common and some are case specific.So you can define the common functionalities as concrete and leave remaining as abstract to be implemented by the class which would extend this class.
 
Jeroen T Wenting
Ranch Hand
Posts: 1847
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
this is asked at least once a week, why don't you search the archives (or better yet, get a decent book on software design principles)?
 
karthikeyan Chockalingam
Ranch Hand
Posts: 259
 
Consider Paul's rocket mass heater.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic