English

What will happen if data members are declared private? - Computer Applications

Advertisements
Advertisements

Question

What will happen if data members are declared private? 

Short Answer

Solution

They can only be accessible within the class in which they are declared. The data remains hidden from other classes. 

shaalaa.com
  Is there an error in this question or solution?
Chapter 8: Encapsulation and Inheritance - EXERCISES [Page 446]

APPEARS IN

Avichal Computer Applications [English] Class 10 ICSE
Chapter 8 Encapsulation and Inheritance
EXERCISES | Q V. 4. | Page 446
Share
Notifications

Englishहिंदीमराठी


      Forgot password?
Use app×