• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

abstract class

 
Anonymous
Ranch Hand
Posts: 18944
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
please tell me why we r using abstract class.
what is the difference between interface class &
abstract class.thanks in advance
baskar
 
Amit Zzz Kulkarni
Ranch Hand
Posts: 30
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
If you can get notification that this question has been updated just let me know and I will clear off your doubt.Or if somebody else is interested mail me at my profile address which is amitkulz@hotmail.com
Rgds
Amit
 
Anonymous
Ranch Hand
Posts: 18944
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The abstract and Interface even though they are performing same functions are a little bit different.In abstract classes we can give implementation for the methods.In Interface all members we declare are strictly public and also no implementation can be given.so if u have large number of methods which have to be implemented in separate classes u better go for an Interface.on the other hand if u just want to have just simple inheritance from base class u go for abstract class.Remember if u use Interface u cannot declare any contructor inside Interface and all the data members inside Interface are implicitly public final.
please reply if u are clarified
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic