Thanks to Fei Ng and James for the reply, I understand what you mean, I just need to once more clarify the word if and only if quoted above.
Consider the following example, in this case class Derived has no constructors, but it can not be given a default constructor since its superclass has no default, no argument constructor. This restriction applies because for a subclass, you need to complete constructor hierarchy of the superclasses.
The compiler error you get is -
"No constructor matching Base() found in class Base.
public class Derived extends Base"
Also remember that for a class which does not (explicitly) extend another class, an immediate superclass is Object, which has a default constructor, hence if you have no other constructor in such a class, a default constructor will be provided by
Java. So, the statement is right.
HTH,
- Manish
[This message has been edited by Manish Hatwalne (edited October 30, 2001).]