Which component of a class initialises new objects when created with new…
2025
Which component of a class initialises new objects when created with new keyword in Java?
- A.
Fields
- B.
Constructors
- C.
Methods
- D.
Static blocks
Attempted by 57 students.
Show answer & explanation
Correct answer: B
In Java, constructors are special methods that initialize new objects when created with the new keyword. They set up initial state and ensure proper object creation before use.