हिंदी

Differentiate between private and protected visibility modifiers. - Computer Applications

Advertisements
Advertisements

प्रश्न

Differentiate between private and protected visibility modifiers.

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

उत्तर

S. No. Private Protected
1. Private members are only visible within the class where they were defined. Protected members are visible to classes within the same package and to subclasses (including those from other packages).
2. Private elements are not shared with other classes during inheritance.  Protected elements can be applied to derived classes during inheritance.
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 2. | पृष्ठ ३८०
अविचल Computer Applications [English] Class 10 ICSE
अध्याय 6 Class as the Basis of all Computation (Objects and Classes)
EXERCISES | Q V. 6. | पृष्ठ ३८४
Share
Notifications

Englishहिंदीमराठी


      Forgot password?
Use app×