public class Person {
private String name;
private int age;
private String sex;
Person()
{
}
Person(String name)
{
this.name = name;
}
Person (String name,int age)
{
this(name);
this.age = age;
}
Person(String name,int age,String sex)
{
this(name,age);
this.sex = sex;
}
}
这样反复的调用 会不会浪费内存? |
|