1 |
The command
|
2 |
package cps616;
|
3 |
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
|
4 |
Note classes are called package.Classname where packages in Java system are all termed java.subpackagename
|
5 |
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
|