Computer Applications

Differentiate between private and protected visibility modifiers.

Java Classes

ICSE 2010

ICSE 2012

51 Likes

Answer

Private members are only accessible inside the class in which they are defined and they cannot be inherited by derived classes. Protected members are also only accessible inside the class in which they are defined but they can be inherited by derived classes.

Answered By

29 Likes


Related Questions