__________ will be automatically invoked when an object is created.
-
method
-
garbage collection
-
finalizer
-
Constructor
-
none of the above
D
Correct answer
Explanation
Constructors are special methods invoked automatically when a new object is instantiated using the 'new' keyword. They initialize the object's state and set up required resources. Methods must be called explicitly, garbage collection runs automatically to reclaim memory, and finalizers are called before garbage collection (not during object creation).