Skip to content

Object-Oriented Programming (OOP)

Instance variable is best defined as which of the following?

Difficulty: Medium

About this MCQ

This Medium Object-Oriented Programming (OOP) MCQ checks one syllabus fact.

The question is: “Instance variable is best defined as which of the following?”

The accepted answer is D. A variable defined in a class for which each object of that class maintains its own separate copy.. Instance variable is best defined as which of the following is answered by A variable defined in a class for which each object of that class maintains its own separate copy option D Option A The process by which objects communicate with one another by invoking each other's methods does not match the stem it is a near-miss used to catch incomplete recall of A variable defined in a class for which each object of that class maintains its own separate copy Option B A special method automatically invoked when an object is destroyed used to release resources does not match the stem it is a near-miss used to catch incomplete recall of A variable defined in a class for.

Correct answer

D. A variable defined in a class for which each object of that class maintains its own separate copy.

Explanation

Instance variable is best defined as which of the following is answered by A variable defined in a class for which each object of that class maintains its own separate copy option D Option A The process by which objects communicate with one another by invoking each other's methods does not match the stem it is a near-miss used to catch incomplete recall of A variable defined in a class for which each object of that class maintains its own separate copy Option B A special method automatically invoked when an object is destroyed used to release resources does not match the stem it is a near-miss used to catch incomplete recall of A variable defined in a class for.

Source: Object-Oriented Programming (OOP) Official Reference Guide

Tags: computer science, oop, object-oriented programming, software design

Submitted by: MCQsHub Editorial

Related MCQs

More Object-Oriented Programming (OOP) MCQs