Computer Science, asked by premitapradhan, 9 months ago

what is object initialization machanisim? Explain all available machansm in java.​

Answers

Answered by Anonymous
0

Explanation:

As you know, a class provides the blueprint for objects; you create an object from a class. ... Instantiation: The new keyword is a Java operator that creates the object. Initialization: The new operator is followed by a call to a constructor, which initializes the new object.

The Java language has three mechanisms dedicated to ensuring proper initialization of objects: instance initializers (also called instance initialization blocks), instance variable initializers, and constructors.

mark as the brainliest if it is helpful

Similar questions