//file: LML.java
package packLML;
public class LML {}
//file: Test5.java
//Unamed package in the current directory.(C:\SCJP\Threads\)
import packLML.*;
public class Test5 {
public static void main(
String[] args) {
LML lml = new LML(); //line (1)
}
}
LML.java compiled with out any Error as expected.
Where as when I tried to compile Test5.java this is the error I got...
Test5.java:7: cannot access LML
bad class file: .\LML.java
file does not contain class LML
Please remove or make sure it appears in the correct subdirectory of the classpa
th.
LML lml = new LML();
^
If I change line (1) to
packLML.LML lml = new packLML.LML();
It compiles fine.Even after importing packLML why am I not able to access packLML.LML by its shortcut name LML???