Important Java Mcq 1

in object-oriented programming composition relates to?

a. The organization of components interacting to achieve a coherent, common behavior

b. The use of inheritance to achieve polymorphic behavior

c. The use of data hiding to achieve polymorphic behavior.

d. The use of consistent coding conventions

Answer:

a. The organization of components interacting to achieve a coherent, common behavior.

Explanation:

Composition is one of the fundamental concepts in object-oriented programming. It describes a class that references one or more objects of other classes in instance variables. This allows you to model a has-a association between objects.

Related MCQs
Aniket Malik

Aniket Malik

CERTIFIED TUTOR/TRAINER WITH 300+ REVIEWS

Facing difficulty with

this concept?