what is object initialization machanisim? Explain all available machansm in java.
Answers
Answered by
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
English,
4 months ago
Math,
4 months ago
English,
4 months ago
Business Studies,
9 months ago
English,
1 year ago