my dog learned polymorphism*
The moose likes Programmer Certification (SCJP/OCPJP) and the fly likes Constructor in Abstract Classes Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Certification » Programmer Certification (SCJP/OCPJP)
Bookmark "Constructor in Abstract Classes" Watch "Constructor in Abstract Classes" New topic
Author

Constructor in Abstract Classes

Navin Mishra
Greenhorn

Joined: Aug 11, 2008
Posts: 1
Hi Everyone,

My first post at Javaranch.

Wanted to know what purpose does constructors serve in Abstract Classes if those classes should never be instantiated.

Regards
Navin
Deepak Bajoria
Ranch Hand

Joined: Mar 07, 2008
Posts: 35
Constructors in abstract classes get executed when their subclasses are instantiated. As you know there is has to be a call to super() in subclass' constructors.


SCJP 5 - 93%
 
Consider Paul's rocket mass heater.
 
subject: Constructor in Abstract Classes
 
Similar Threads
WA #1.....word association
modifers
How To Placed variables in Abstract classes
Abstract classes
How To Placed variables in Abstract classes