हिंदी

Differentiate between public and private modifiers for the members of a class. - Computer Applications

Advertisements
Advertisements

प्रश्न

Differentiate between public and private modifiers for the members of a class. 

अंतर स्पष्ट करें

उत्तर

  1. Private modifier: A class member declared to be private has its access limited to the class block only. By no means, a private member can be applied outside the class block.
  2. Public modifier: A class member that is declared to be public can be accessed inside as well as outside the class block. By default, a class member is declared to be public.
shaalaa.com
  क्या इस प्रश्न या उत्तर में कोई त्रुटि है?
अध्याय 6: Class as the Basis of all Computation (Objects and Classes) - Review Insight [पृष्ठ ३८०]

APPEARS IN

अविचल Computer Applications [English] Class 10 ICSE
अध्याय 6 Class as the Basis of all Computation (Objects and Classes)
Review Insight | Q 4. | पृष्ठ ३८०
Share
Notifications

Englishहिंदीमराठी


      Forgot password?
Use app×