public class Test{
String name;
String sxe;
int age;
public Test(){
System.out.println("构造无参函数");
}
public Test(String name){
this.name=name;
System.out.println(this.name);
}
public Test(String name,String sxe){
this.name=name;this.sxe=sxe;
System.out.println(this.sxe+this.name);
}
public Test(String name,String sxe,int age){
this.name=name;this.sxe=sxe;
this.age=age;
System.out.println(name+sxe+age);
}
}
class Su{
public static void main(String[] args){
Test a=new Test();
Test b=new Test("aa");
Test c=new Test("no","aa");
Test d=new Test("aa","no",20);
}
}