Information Technology Reference
In-Depth Information
Public members are accessible to all other objects in the program. Use the public access
modifier to specify public access.
Access modifier
public int MyInt;
Depicting Public and Private Access
The figures in this text represent classes as labeled boxes, as shown in Figure 4-5.
￿
The class members are represented as smaller labeled boxes inside the class boxes.
￿
Private members are represented enclosed entirely within their class box.
￿
Public members are represented sticking partially outside their class box.
Figure 4-5. Representing classes and members
Search WWH ::




Custom Search