|
package myLib; // package clause public class TestPackage { public static void main(String[] args) { System.out.println("Hello World"); } } |
How to run the program:
|
|
Example:
|
|
Explanation:
|
|
Example:
cd Dir (cd to the directory that contains packageX) java packageX/javaProgram.java |
cd Dir (cd to the directory that contains packageX) java packageX.javaProgram |