Java libraries are organized in packages (directories). The most common way to get access to them is to use the import statement. For example,
import java.util.*;
. . .
ArrayListstudentNames; // ArrayList is a class in java.util
gives your program access to the all (that's what the "*" means) classes in the package java.util. The source files for these classes are in a directory named util, which is in a directory named java.
No comments:
Post a Comment