Skip to main content

Posts

Showing posts from February, 2019

Java Packages

Packages In Java: Package is a container for the classes that are used to keep the class name space compartmentalized. In other words,  Java Packages are nothing more thanthe way we organize files into different directories according to their functionality, usability as well as category they should belong to. A Java package is a Java programming language mechanism for orgranizing classes into name spaces. Example: You can contain all classses related to all sorting programs in your own package. We can keep different classes of same type in a same package for better glance of the project. It allows fexibility to give same name but to many classes, that is to avoid name space collision . The packages in Java provides mechanism for partitioning the class name space into more manageable chunks. Infact, package is both a naming and a visibillity control mechanism. It supports reusability and maintainability of the Java codes. Advantages of Packages: Packages prov...