• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

abstract class

 
Ranch Hand
Posts: 18944
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
Ranch Hand
Posts: 30
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
No. No. No. No. Changed my mind. Wanna come down. To see this tiny ad:
a bit of art, as a gift, the permaculture playing cards
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic