关于JAVA构造器问题,请教大家!!
关于JAVA 构造器问题
class Game{
Game(int i){
System.out.println("Game");
}
}
class BoardGame extends Game{
BoardGame(int i){
super(i);
System.out.println("BoardGame");
}
}
public class Cartoon2 extends BoardGame{
Cartoon2(){
super(11);
System.out.println("Cartoon");
}
public static void main(String args[]){
Cartoon2 x= new Cartoon2();
}
}
为什么不能出来运行结果呢?