Multiple choice technology programming languages

__________ will be automatically invoked when an object is created.

  1. method

  2. garbage collection

  3. finalizer

  4. Constructor

  5. none of the above

Reveal answer Fill a bubble to check yourself
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).