O'Reilly logo

Technical Java™: Developing Scientific and Engineering Applications by Grant Palmer

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Chapter 11. Packages and JAR Files

When you start to develop more complicated Java applications, you may end up with a large number of source code, bytecode, and support files. Java provides packages and Java Archive (JAR) files to help you organize and store your work. Packages are used to separate and organize a collection of classes and interfaces. One reason to place your files in a package is to avoid naming conflicts. Two classes can't share the same name unless they are placed in different packages. If you write a class with an obvious name such as Beam, you don't have to worry about whether that name is being used by some other library if you place the Beam class in a user-defined package.

Packages allow you to bundle collections of classes ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required