ICSE Class 10 Computer Applications Question 17 of 17

Encapsulation — Question 6

Back to all questions
6
Question

Question 6

A member method that can change the value of a private data member is called ............... .

  1. setter
  2. getter
  3. manager
  4. accessor
Answer

setter

Reason — Setter/mutator methods allow us to change the value of a private data member as private data members cannot be accessed directly.