class myclass {
public int x;
myclass(){
x=0;
}
public void saysomething(){
System.out.println("welcome to here");
}
}
public class test {
public static void main(String args[]){
myclass test1=new myclass();
System.out.println(test1.x);
test1.saysomething();
}
}
我创建的类是myclass,为什么有错说是“the public type test must be defined in its own file ”??作者: f85144 时间: 2011-5-26 00:45