When does the compiler supply a default constructor for a class?
The compiler supplies a default constructor for a class if no other constructors are provided. In Java, a default constructor is provided by the compiler under certain circumstances. The compiler automatically supplies a default constructor for a class under the following conditions: No Constructors Defined: If you haven’t defined any constructor for your class, the … Read more