K
Ken
Hi. I wanted to derive a class from a Singleton base class (the
derived class doesn't need to be a Singleton). However, I'm finding
that in Java, when I derive a class, if the constructor in the base
class is private, I get a compile error in the derived class'
constructor. I'm calling my base class Base and my derived class
Derived. Both Base and Derived are in the same package. Here's the
error text:
"Implicit super constructer Base() is not visible. Must implicilty
invoke another contstructor."
Is this a Java constraint, namely that you cannot derive a class from
a base class that has only a private constructor?
Note that I'm running Java 1.4.2 through Eclipse 3.0.
Thanks for any info,
Ken
derived class doesn't need to be a Singleton). However, I'm finding
that in Java, when I derive a class, if the constructor in the base
class is private, I get a compile error in the derived class'
constructor. I'm calling my base class Base and my derived class
Derived. Both Base and Derived are in the same package. Here's the
error text:
"Implicit super constructer Base() is not visible. Must implicilty
invoke another contstructor."
Is this a Java constraint, namely that you cannot derive a class from
a base class that has only a private constructor?
Note that I'm running Java 1.4.2 through Eclipse 3.0.
Thanks for any info,
Ken