i have two
java test program in different package: one in default package and one in user defined package..when I tried to use the class in the user define package by importing the whole package, compile error occured: can't resolve symbols,for whatever constructor or methods in the imported package. but when i import individual class, everything works perfect. any one knows why??
here is the test program
ReadNumber.java
package user.test;
public class ReadNumber{
public ReadNumber(){
System.out.println("this is a line from ReadNumber2 constructor");
}
public void test(){
System.out.println("this is a line from test() in readNumber");
}
public static void main(
String arg[]){
ReadNumber rn=new ReadNumber();
System.out.println("this is a line from main");
}
}
TestReadNumber.java
import user.test.ReadNumber; //compiles fine
//import user.test.*; //this won't compile
public class TestReadNumber{
public static void main (String arg[]){
ReadNumber rn = new ReadNumber();
rn.test();
}
}
anyone have any idea why it happened this way..thanks