郁闷 简单题不会,有一个Human类,有两个Human构造器 Human(String name,int age)和Human(String name,int age,int tel) 在三个参数的构造器中如何调用两个参数的构造器,生成此类的两个实例 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 Human h1=new Human("jack",21);Human h2=new Human("jack",21,23545); public class Human{ private String name; private int age; private int tel; public Human(String name,int age){ this.name = name; this.age = age; } public Human(String name,int age,int tel){ this(name,age); this.tel = tel; } //getter and setter} Human(String name,int age,int tel){ this(name,age); } public Human(String name,int age,int tel){ this(name,age); this.tel = tel; }一楼的正确 java中如何使用正则表达式找出一个字符串中小写单词的个数 新手问题,关于Netbeans下的GUI风格 代码问题啊(大至急) 关于Myeclipse的问题 新手 等帮忙 一个初学者的线程问题,有分呀! 【急!高分求助】关于JAVA混淆器的使用的问题 我对子类重载/覆盖父类方法的理解,请大家看对不对? 简单问题 一段Applet图象显示代码,不知错在哪里 请问JAVA中如何用一个给定的String类型的时间与当前时间比较? jsp中include指令怎样使用
Human h2=new Human("jack",21,23545);
private int age;
private int tel; public Human(String name,int age){
this.name = name;
this.age = age;
}
public Human(String name,int age,int tel){
this(name,age);
this.tel = tel;
} //getter and setter}
this(name,age);
}
public Human(String name,int age,int tel){
this(name,age);
this.tel = tel;
}
一楼的正确