Troubleshooting

No-Argument Constructor Not Found in Superclass

You get a compiler error stating that the superclass for a class you are compiling does not have a no-argument constructor.

Every class constructor (other than the constructor for java.lang.Object ) calls one of the constructors for its immediate superclass. This call is an implicit call to the no-argument constructor for the superclass unless you explicitly call another constructor using the super keyword with the required parameter list. If the no-argument superclass constructor is being called, the compiler reports an error if this constructor does not exist or is declared private.

Every class has a no-argument constructor by default unless it declares one or more constructors ...

Get Special Edition Using Java 2 Standard Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.