How is the default Java constructor? Is this?
public Pessoa(){
super();
}
How is the default Java constructor? Is this?
public Pessoa(){
super();
}
The default constructor ( default constructor ) is the one the compiler creates for you. If you create it, it is not the default. You can even simulate a default :
public Pessoa() { super(); }
This is the way a default constructor is set up for you when you do not create it. The default constructor never has parameters and has nothing in the body other than a reference to the upper class. It exists just to start creating the object, it does nothing.
Actually calling super()
in this case is unnecessary . See also: What is the role of super in a Java constructor? .
You are in language specification .