Friday, November 9, 2007

Access Modifiers: public, private, proctecd, package protected(default)

Public : declarations represent specifications – what clients of a package are supposed to rely on. Package Private (default): declarations are part of the implementation of a class that must be known to other classes that assist in the implementation. Protected: declarations are part of the implementation that subtypes may need, but that clients of the subtypes generally won’t. Private: declarations are part of the implementation of a class that only that class needs. *********************************************************************** Import: Does not grant any special access; it only allows abbreviation.

No comments:

Just some daily notes ...

Powered By Blogger