Object-Oriented Programming (OOP)
What term describes the following? a special method automatically called when an object of a class is created, used to initialize it.
- A. Class
- B. Constructor ✓
- C. Interface
- D. Abstract class
Correct answer
B. Constructor
Explanation
Constructor refers to a special method automatically called when an object of a class is created, used to initialize it.