Private - Protected - Public

From TRCCompSci - AQA Computer Science
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.