Why do we need no-arg constructor?

The arguments of a constructor can only be found by type, not by name, so there is no way for the framework to reliably match properties to constructor args . Therefore, they require a no-arg constructor to create the object, then can use the setter methods to initialise the data.

Read more

What is no-arg constructor?

No-Arg Constructor – a constructor that does not accept any arguments . Parameterized constructor – a constructor that accepts arguments. Default Constructor – a constructor that is automatically created by the Java compiler if it is not explicitly defined.

Read more