Object-Oriented Programming (OOP)
The concept in which a special method automatically invoked when an object is destroyed, used to release resources is best known as which of these terms?
Difficulty: Medium
About this MCQ
This Medium Object-Oriented Programming (OOP) MCQ checks one syllabus fact.
The question is: “The concept in which a special method automatically invoked when an object is destroyed, used to release resources is best known as which of these terms?”
The accepted answer is D. Destructor. Destructor refers to a special method automatically invoked when an object is destroyed, used to release resources.
- A. Static member
Why not A: “Static member” is not correct. The accepted answer is D. Destructor. Destructor refers to a special method automatically invoked when an object is destroyed, used to release resources.
- B. Composition over inheritance
Why not B: “Composition over inheritance” is not correct. The accepted answer is D. Destructor. Destructor refers to a special method automatically invoked when an object is destroyed, used to release resources.
- C. Access modifier
Why not C: “Access modifier” is not correct. The accepted answer is D. Destructor. Destructor refers to a special method automatically invoked when an object is destroyed, used to release resources.
- D. Destructor ✓
Correct answer
D. Destructor
Explanation
Destructor refers to a special method automatically invoked when an object is destroyed, used to release resources.
Source: Object-Oriented Programming (OOP) Official Reference Guide
Tags: computer science, oop, object-oriented programming, software design
Submitted by: MCQsHub Editorial
Related MCQs
- Identify the correct definition of Destructor.
- What term describes the following? a class member that belongs to the class itself rather than to any individu...
- In computer science, Static member refers to which of the following?
- Select the correct name for: a keyword that controls the visibility and accessibility of a class's members, su...
- Which statement correctly explains Access modifier?
- Which concept is defined as follows: a design principle in which a class is built using instances of other cla...