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.

Sizin İçin Seçtik  Kagir ne demek türkçe anlamı?

Leave a Reply

Your email address will not be published. Required fields are marked *

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.

Sizin İçin Seçtik  Is it possible to overload constructor in Java?

Leave a Reply

Your email address will not be published. Required fields are marked *