Sparx Systems Forum
Enterprise Architect => General Board => Topic started by: sargasso on March 17, 2004, 02:31:08 pm
-
Herewith, my entry for "Dumbest question of the Week" 8)
Can an abstract class have a constructor? What I mean is, even though (to us) an abstract class constructor seems to be a meaningless concept, are there any circumstances where it would not be meaningless.
???
Bruce
-
Sure. Consider
public abstract class Foo {
Foo() { init(); }
public abstract init();
}
The method init() is declared and used in the abstract base class, but is defined
in some concrete inheriting class.
Jim
-
Considering ....
PHP?