我写了以下代码。
class String {
private final java.lang.String s;
public String(java.lang.String s){
this.s = s;
}
public java.lang.String toString(){
return s;
}
public static void main(String[] args) {
String s = new String("Hello world");
System.out.println(s);
}
}
当我执行它时,出现以下错误
The program compiled successfully, but main class was not found.
Main class should contain method: public static void main (String[] args).
为什么会这样?...虽然定义了主要方法,为什么系统没有读取/识别它?