File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Programmer Certification (SCJP/OCPJP) and the fly likes Abstract Class Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Certification » Programmer Certification (SCJP/OCPJP)
Bookmark "Abstract Class" Watch "Abstract Class" New topic

Abstract Class

Akhilesh Trivedi
Ranch Hand

Joined: Jun 22, 2005
Posts: 1599
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? :-/

Keep Smiling Always — My life is smoother when running silent. -paul
[FAQs] [Certification Guides] [The Linux Documentation Project]
Saravanan Thirugnanam

Joined: Jan 19, 2005
Posts: 20
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..

saravanan T
Naveen Punati

Joined: Apr 13, 2005
Posts: 28

its not possible to create instance for an abstract class 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....

I agree. Here's the link:
subject: Abstract Class
It's not a secret anymore!