又一个JAVA问题(没有运行结果)
//: innerclasses/ClassInInterface.java
// {main: ClassInInterface$Test}
public interface ClassInInterface {
void howdy();
class Test implements ClassInInterface {
public void howdy() {
System.out.println("Howdy!");
}
public static void main(String[] args) {
new Test().howdy();
}
}
}
运行提示信息:
Error: Main method not found in class ClassInInterface, please define the main method as:
public static void main(String[] args)