हिंदी

Explain data hiding with respect to OOP.

Advertisements
Advertisements

प्रश्न

Explain data hiding with respect to OOP.

स्पष्ट कीजिए
Advertisements

उत्तर

Data hiding is the mechanism of restricting direct access to the data of a class from outside the class.

  • It protects data from accidental or intentional misuse.
  • It is achieved by making data members private.
  • Private data can be accessed only through the methods of the same class, while public members can be accessed from outside.
shaalaa.com
  क्या इस प्रश्न या उत्तर में कोई त्रुटि है?
अध्याय 2: Concept of Object Oriented Programming - EXCERCISE [पृष्ठ ३७]

APPEARS IN

सीबीएसई Computer Science with Python [English] Class 12
अध्याय 2 Concept of Object Oriented Programming
EXCERCISE | Q 9. | पृष्ठ ३७
Share
Notifications

Englishहिंदीमराठी


      Forgot password?
Use app×