Question 63

In object-oriented programming, by wrapping up characteristics and behavior into one unit, we achieve

  1. AData abstraction
  2. BData encapsulation
  3. CData hiding
  4. DAll of these
Show answerHide answer

Correct answer: (B) Data encapsulation

Explanation

Encapsulation wraps data (characteristics) and the functions that act on it (behaviour) into one unit, the class. Data hiding and abstraction are results of this.

From DSSSB TGT Computer Science Practice Set 3

This is question 63 of DSSSB TGT Computer Science Practice Set 3. See all questions of this paper with answers, or attempt the paper as a timed online test to get your score and all-India rank.