A friendly place for programming greenhorns!
Big Moose Saloon
Register / Login
Win a copy of
this week in the
Programmer Certification (SCJP/OCPJP)
Constructor in Abstract Classes
Joined: Aug 11, 2008
Aug 11, 2008 09:05:00
My first post at Javaranch.
Wanted to know what purpose does constructors serve in Abstract Classes if those classes should never be instantiated.
Joined: Mar 07, 2008
Aug 11, 2008 10:50:00
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 - 93%
I’ve looked at a lot of different solutions, and in my humble opinion Aspose is the way to go. Here’s the link:
subject: Constructor in Abstract Classes
The definition of instantiation for Abstract Superclass
Abstract class also has constructor
All times are in JavaRanch time: GMT-6 in summer, GMT-7 in winter
| Powered by
Copyright © 1998-2015