Basic HTML version of Foils prepared May 12 1996

Foil 70 Overview of Packages

From CRPC Lectures on Java Language Applets Graphics CRPC Annual Meeting Tutorial -- May 14,1996. by Geoffrey C. Fox


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

in Table To:


Northeast Parallel Architectures Center, Syracuse University, npac@npac.syr.edu

If you have any comments about this server, send e-mail to webmaster@npac.syr.edu.

Page produced by wwwfoil on Sun Dec 14 1997