Back
Following are the advantages of using packages in Java:
The package creates a new namespace so there won't be any name conflicts with names in other packages.
Programmers can define their own packages to bundle a group of classes/interfaces, etc.
Packages helps to provide access control
Comparatively easily to locate the related classes
31k questions
32.8k answers
501 comments
693 users