• 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: 1609
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
If a class has abstract method/s it must be declared abstract. The implementation of the method may be provided in the subclass. Ok!!! But is it that I MUST AND MUST have the subclass. I know it isnt wise but what if I dont extend a thing from it? :-/
 
Greenhorn
Posts: 20
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Its No problem if u dont have a subclass for a abstract class. But if you extend from a abstract class, the subclass must either give the implementation for all the abstract methods of the parent class or else ,the subclass should also be declared as abstract.
Inform me if i misunderstood your question..
 
Greenhorn
Posts: 28
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
hai...

its not possible to create instance for an abstract class ...so definitely u will extend it ..otherwise no use of declaring abstract class...

if u extend from an abstract class definitely u should inplement all the abstract classes otherwise deine child class as abstract...

i think this will clarify ur doubt....

truly,
Naveen.
reply
    Bookmark Topic Watch Topic
  • New Topic