group-icon
Java Developers
Group for Java developers and programmers. Ask questions and get answers related to Java programming
270 Members
Join this group to post and comment.
Shruthi Pillai
Shruthi Pillai
Information Technology
29 Jan 2019

Advantages of packages

Packages avoid the name clashes.

The Package provides easier access control.

We can also have the hidden classes that are not visible outside and used by the package.

It is easier to locate the related classes.



AdhikariHarika Reshma
AdhikariHarika Reshma
Computer Science
3mos ago

Advantages of Packages:

1.Programmers can easily define their own packages to bundle a group of classes/interfaces.

2.Using packages it is easier to provide access control.

3.Packages provide reusability of code.

4.It is also easier to locate related classes.

5.we can also import the available built in packages.

6.Since the package creates a new namespace there won't be any conflicts with names in other packages.

7.Packages are used to categorize the classes and interfaces so that they can be easily maintained.

Archana Priyadarshini
Archana Priyadarshini
Computer Science
3mos ago

Advantages of using packages in java

  1. Java package provides access protection. 
  2. Java package removes naming collision. 
  3. Java package is used to categorize the classes and interfaces so that they can be easily maintained.
  4. Packages provide reusability of code.
  5. To bundle classes and interfaces.
  6. We can create our own Package or extend already available Package.