import的用法,各位帮帮忙
package org.it315;import org.it315.example.*;
class TestPackage{
public static void main(String[] args){
new Test().print();
}
}
package org.it315.example;
class Test{
public void print(){
System.out.println("这是关于import语句如何应用的程序");
}
}
错误提示
--------------------Configuration: <Default>--------------------
G:\javacaogao\import语句的应用.java:9: 需要为 class、interface 或 enum
package org.it315.example;
^
1 错误
Process completed.