Access Levels
Modifier Class Package Subclass World
public Y Y Y Y
protected Y Y Y N
no modifier Y Y N N
private Y N N N
Public – access allowed to public. E.g., constants
Protected – allow child to access parent.
No modifier – allow package member to access only.
Private – non-accessible.
Static Initialize
- init static constant variables or object
- loaded before class is loaded
- prevents lock scenario
static
{
*action
}
Tuesday, March 10, 2009
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment