Package - a mechanism to manage namespace Java-program. Classes defined without an explicit access modifiers (public, protected, private), are only visible inside the package. Valid nested packages. Class Package Subclass World private Y - - -- (no) Y Y - -- protected Y Y Y -- public Y Y Y Y private - accessible only within the class (most recommended) (no modifier) - just inside the package (default) protected - mezhpaketny access only to the sub-class public - mezhpaketny access (least recommended)
Подписаться на:
Комментарии к сообщению (Atom)


0 коммент.:
Отправить комментарий