Home

Published

- 1 min read

object instantiation vs construction

img of object instantiation vs construction

The solution for this is noted below

object instantiation vs construction

Solution

   Object Creation (Instantiation) and Initialization (Construction) are
different things in Java. Construction follows object creation.
Object Creation is the process to create the object in memory and
returning its handler.
Java provides “new” keyword for object creation.
Initialization is the process of setting the initial/default values
to the members.
Constructor is used for this purpose. If we don't provide any constructor,
Java provides one default implementation to set the default values according
to the member data types.

Try other methods by searching on the site. That is if this doesn’t work