The command
|
package cps616;
|
can be used to group classes together. A package statement can be repeated -- e.g all students could use the above package statement in their Java files and the corresponding classes would be grouped in this one package
|
Note classes are called package.Classname where packages in Java system are all termed java.subpackagename
|
One uses files in a package by inserting
-
import cps616.* at beginning of file that neededs classes from cps616 package
-
In this case classes in cps616 package can be refered to by just using their Classname
-
Without import command, one must explicitly say cps616.Classname
|