Computer Science Department, Bucknell University

Packages in Java
CSCI 479 Computer Science Design
Fall, 2009

In Java, a package is a collection of classes. They are used to organize a large collection of classes into hierarchical groups. By specifying the package name, you can avoid conflicts when classes have the same name.

If you intent to share your Java classes with the world, it is suggested that you use your host's domain name in reverse as the start of your package name. For example, "edu.bucknell.hyde".

Reference: pages 346-352 in Java: How to Program by Deitel and Deitel, 8th edition, Prentice Hall, 2009 (pages 402-408 in 7th edition).


Page maintained by Dan Hyde, hyde at bucknell.edu Last update October 4, 2009
Back to CSCI 479's home page.