class Base1 {
int x=50;
}
class Child extends Base1{
int x=20;
void show() {
System.out.println(x);
}
public static void main(String[] args) {
Child c1=new Child();
c1.show();
}
}
您好我是新來的Java編程和試圖在Netbeans中運行上面的代碼中,我得到了一個錯誤傳承試圖使程序
Error: Main method not found in class base1.Base1, please define the main method as:
public static void main(String[] args)
請給予解決
「_please give the solution_」請學習Java。 – Unihedron
請轉到[The Java Tutorials:** Learning the Java Language **](http://docs.oracle.com/javase/tutorial/java/index.html) – Barranka