If one decides to add a default constructor to the class.
You don't decide to add a default constructor. The compiler adds one for you if you don't specify any constructors at all.
The one it adds is defined by JLS§8.8.9:
If a class contains no constructor declarations, then a default constructor is implicitly declared. The form of the default constructor for a top level class, member class, or local class is as follows:
The default constructor has the same accessibility as the class (§6.6).
The default constructor has no formal parameters, except in a non-private inner member class, where the default constructor implicitly declares one formal parameter representing the immediately enclosing instance of the class (§8.8.1, §15.9.2, §15.9.3).
The default constructor has no throws clauses.
If the class being declared is the primordial class Object, then the default constructor has an empty body. Otherwise, the default constructor simply invokes the superclass constructor with no arguments.
So if Circle
is public, then the default's signature would be:
public Circle()
e.g., the full generated version is:
public Circle() {
super();
}