June 2012
Intermediate to advanced
288 pages
6h 48m
English
protected Keyword
Using a protected keyword declares protected visibility for a class, variable, or method. Items with protected visibility can be accessed by any subclasses of the class in which the protected item is declared, but cannot be accessed from other classes in the program.
Here’s an example that declares a protected class variable:
protected int Diameter;
Read now
Unlock full access