What are Packages?
● A package is a grouping of related types providing access protection and name space management
– Note that types refers to classes, interfaces, enumerations, and annotation types.
– Types are often referred to simply as classes and interfaces since enumerations and annotation types are special kinds of classes and interfaces, respectively, so types are often referred to simply as classes and interfaces.
Benefits of Packaging
● You and other programmers can easily determine that these classes and interfaces are related.
● You and other programmers know where to find classes and interfaces that can provide graphics related functions.
● The names of your classes and interfaces won't conflict with the names in other packages because the package creates a new namespace.
● You can allow classes within the package to have unrestricted access to one another yet still restrict access for types outside the package.
● A package is a grouping of related types providing access protection and name space management
– Note that types refers to classes, interfaces, enumerations, and annotation types.
– Types are often referred to simply as classes and interfaces since enumerations and annotation types are special kinds of classes and interfaces, respectively, so types are often referred to simply as classes and interfaces.
Benefits of Packaging
● You and other programmers can easily determine that these classes and interfaces are related.
● You and other programmers know where to find classes and interfaces that can provide graphics related functions.
● The names of your classes and interfaces won't conflict with the names in other packages because the package creates a new namespace.
● You can allow classes within the package to have unrestricted access to one another yet still restrict access for types outside the package.
No comments:
Post a Comment