public class Flower {
String s = "i:";
Flower(int i){
System.out.println("1:"+i);
}
Flower(int i,String s){
this(i);
this.s = s;
System.out.println("2:"+s);
}
Flower(){
this(1,"ss");
//this(1);
System.out.println("0:");
}
public static void main(String[] args){
Flower x = new Flower();
}
}
this 构造器中调用构造器
最新推荐文章于 2022-08-01 16:49:34 发布