How do I compile and run the following programs:
Test1.java:
package A; public class Test1 { public int a = 1; }
Test2.java:
you should keep your .java files in directory structure matching your package structure
so Test1.java should go in directory A so Test2.java should go in directory B