Fifth International World Wide Web Conference
Program Structure
- Source code consists of one or more compilation units (.java files)
- Each compilation unit can contain:
- a package statement
- import statements
- class declarations
- interface declarations
- Java compiler reads a Java compilation unit and produces one or more binary
bytecode files (.class files)
- Named according to the names of the classes or interfaces in the
compilation unit
- Case is always significant
- Example: compilation unit MyClass.java containing classes named MyClass and
MyList will produce MyClass.class and MyList.class as output files.
Java - An Introductory Language Tutorial
(E.A.Johnson)