<<< Java packages | Index | Creating library in NetBeans >>> |
Note: package names must match the path to the subdirectory where each package is stored
For example, assume that a full local path to the class file named DBConnection.java is
C:/c257c/src/bcc/database DBConnection.java
If C:/c257c/src is a root directory for all classes, then the name of the package should be
//NOTE: the package statement must be the first statement in the file
package bcc.database
The import statement for the DBConnection class becomes
import bcc.database.DBConnection;
<<< Java packages | Index | Creating library in NetBeans >>> |