Multiple choice .net

Which of the following is part of an object?

  1. Methods

  2. Properties

  3. Instances

  4. Both a and b.

  5. All of the above.

Reveal answer Fill a bubble to check yourself
D Correct answer
Explanation

Objects in object-oriented programming contain both methods (functions/behaviors) and properties (data/attributes). Instances are individual objects created from a class, not components within an object itself. Therefore, option D correctly identifies the two fundamental components that make up an object.

AI explanation

In object-oriented programming, an object bundles data (properties) and behavior (methods) together — both are structural parts of an object. An instance is not a part of an object; rather, an object is an instance of a class, so listing it as a component is a category error.