java 求大神看一下这个程序 很简单的 可以讲下大致思路吗?谢谢
publicclassWaiter{intvar; Waiter(intvar){ this("Welcome"); ...
public class Waiter {
int var;
Waiter(int var) {
this("Welcome");
}
Waiter(String s) {
this();
System.out.println(s);
}
Waiter() {
System.out.println("Good-bye");
}
public static void main(String[] args) {
Waiter t = new Waiter(1);
}
} 展开
int var;
Waiter(int var) {
this("Welcome");
}
Waiter(String s) {
this();
System.out.println(s);
}
Waiter() {
System.out.println("Good-bye");
}
public static void main(String[] args) {
Waiter t = new Waiter(1);
}
} 展开
2个回答
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询