This week's book giveaway is in the Servlets forum.
We're giving away four copies of Murach's Java Servlets and JSP and have Joel Murach on-line!
See this thread for details.
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


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Certification » Programmer Certification (SCJP/OCPJP)
Bookmark "Abstract Class" Watch "Abstract Class" New topic
Author

Abstract Class

Akhilesh Trivedi
Ranch Hand

Joined: Jun 22, 2005
Posts: 1526
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
Greenhorn

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
Greenhorn

Joined: Apr 13, 2005
Posts: 28
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.
 
Consider Paul's rocket mass heater.
 
subject: Abstract Class
 
Similar Threads
abstract method
a question about modifier
static and abstract
abstract methods
abstract