This week's book giveaway is in the Mac OS forum.
We're giving away four copies of a choice of "Take Control of Upgrading to Yosemite" or "Take Control of Automating Your Mac" and have Joe Kissell on-line!
See this thread for details.
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


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%
 
GeeCON Prague 2014
 
subject: Constructor in Abstract Classes