मराठी
तामिळनाडू बोर्ड ऑफ सेकेंडरी एज्युकेशनएचएससी विज्ञान इयत्ता ११

What is the difference between the members present in the private visibility mode and the members present in the public visibility mode? - Computer Science

Advertisements
Advertisements

प्रश्न

What is the difference between the members present in the private visibility mode and the members present in the public visibility mode?

फरक स्पष्ट करा

उत्तर

Members present in the private visibility mode:

  • Can be accessed only by the class members.
  • By default, the members will be in private visibility mode.
  • When classes are inherited, private members are not inherited.

Members present in the public visibility mode:

  • Can be accessed by outside members also.
  • Members, to be in public visibility mode have to be specified explicitly.
  • When classes are inherited, the public members are inherited as private, protected, and public members of the derived class.
shaalaa.com
Visibility Modes
  या प्रश्नात किंवा उत्तरात काही त्रुटी आहे का?
पाठ 16: Inheritance - Evaluation - Section - C [पृष्ठ २७३]

APPEARS IN

सामाचीर कलवी Computer Science [English] Class 11 TN Board
पाठ 16 Inheritance
Evaluation - Section - C | Q 2. | पृष्ठ २७३
Share
Notifications

Englishहिंदीमराठी


      Forgot password?
Use app×