Take Away: In OOP languages, members of a class have a specific scope that indicates visibility. Standard visibility includes private, protected, and public. Private members are usable by the defining class only (fully encapsulated). They are invisible outside of the class except by friendly classes.
Protected members are usable by the defining class and descendant classes only (plus friendly classes). Public members are usable wherever its class can be referenced.
In OOP languages, members of a class have a specific scope that indicates visibility. Standard visibility includes private, protected, and public. Private members are usable by the defining class only (fully encapsulated). They are invisible outside of the class except by friendly classes.
Protected members are usable by the defining class and descendant classes only (plus friendly classes). Public members are usable wherever its class can be referenced.
In most OOP languages, private, protected, and public members of a class have a specific scope:
Private = Used by the defining class only. Invisible outside of the class except by friendly classes.
Protected = Used by the defining class and descendant classes only (plus friendly classes).
Public = Visible wherever its class can be referenced.
Each OOP language implements these standard scope specifiers in slightly different ways.