• 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
  • Tim Cooke
  • paul wheaton
  • Ron McLeod
  • Jeanne Boyarsky
Sheriffs:
  • Paul Clapham
Saloon Keepers:
  • Tim Holloway
  • Roland Mueller
Bartenders:

diff b/w ABSTRACT class and INTERFACE.

 
Greenhorn
Posts: 8
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
hi friends,
I would like to know the exact difference between
an ABSTRACT class and an INTERFACE.
Which would suit the exact requirement.
thanks in advance
regards
- mohan
 
Ranch Hand
Posts: 141
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,
interface is to help java programmers to implement multiple
inheritance.Your class has to implement an interface or
multiple interfaces.Similarly one interface can extends other interface as well

whereas "abstract"class can not be instantiated.
Hope this helps.
regds
NM
 
Ranch Hand
Posts: 103
Java Linux Windows
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hello Mohan,
I would like to add more difference,
-In interface, the methods will not be having any 'body'(definition) but in abstract classes methods r allowed to have body.
- In interface if u define any variables then it will be implicitly coderanch, as well methods also. But not so in abstract classes.
------------------
Anil Kollur
 
She's out of the country right now, toppling an unauthorized dictatorship. Please leave a message with this tiny ad:
Clean our rivers and oceans from home
https://www.kickstarter.com/projects/paulwheaton/willow-feeders
reply
    Bookmark Topic Watch Topic
  • New Topic