JAVA初学者求指教
下面一段代码是为了试验类的继承,可是在Eclipse中无法运行呀,结果是上次程序的结果,这是什么原因呢?
class FatherClass {
int a;
void One() {
System.out.println("i am a student");
}
}
class Two extends FatherClass {
void Three() {
System.out.println("I am a boy");
}
}
class Resu {
public static void main(String[] args) {
Two tw = new Two();
tw.One();
}
}