注意:此页面搜索的是所有试题
题目内容
(石家庄铁道大学面向对象程序设计)
程序,写结果()
class TT{
public TT(){
System.out.println("What a pleasure!");
}
public TT(String s){
this();
System.out.println("I am "+s);
}
}
public class Test extends TT{
public static void main(String args[]){
Test t = new Test("Tom");
}
public Test(String s){
super(s);
System.out.println("How do you do?");
}
public Test(){
this("I am Tom");
}
}
class TT{
public TT(){
System.out.println("What a pleasure!");
}
public TT(String s){
this();
System.out.println("I am "+s);
}
}
public class Test extends TT{
public static void main(String args[]){
Test t = new Test("Tom");
}
public Test(String s){
super(s);
System.out.println("How do you do?");
}
public Test(){
this("I am Tom");
}
}
参考答案
![](/lib/img/vx.png)
![](/lib/img/EnteWeChat.png)