Private - Protected - Public

From TRCCompSci - AQA Computer Science
Revision as of 09:42, 3 September 2020 by Admin (talk | contribs) (Created page with "=Private= Private members are accessible only within the body of the class (not in sub-class) =Protected= A protected member is accessible within its class and within any sub...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

Private

Private members are accessible only within the body of the class (not in sub-class)

Protected

A protected member is accessible within its class and within any sub-class instances.

Public

Public members are accessible by all, ie no restrictions.