ICSE Class 10 Computer Applications Question 15 of 17

Encapsulation — Question 2

Back to all questions
2
Question

Question 2

Through which access specifier, a class makes its element visible to all ?

  1. public
  2. private
  3. protected
  4. friendly
Answer

public

Reason — A class makes its element visible to all by using public specifier as a public data member and method can be accessed by any other class.