搜题
问题   更新时间2023/4/3 12:59:00

程序,写结果()

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");
}

}

正确答案为: What a pleasure! I am Tom How do you do?
王老师:19139051760(拨打)