
class Person...{
String name;
String hobby;
String wife;
int age;

public Person(String name)...{
this.name = name;
}

public Person(String hobby,String wife)...{
this.hobby = hobby;
this.wife = wife;
}

public Person(int age)...{
//this("张无忌");
this("乾坤大挪移","赵敏");
this.age = age;
}

void shout()...{
System.out.println("Name is " + name);
System.out.println("Hobby is " + hobby);
System.out.println("Wife is " + wife);
System.out.println("Age is " + age);
}

public static void main(String[] args)...{
new Person(26).shout();
}
}
159



被折叠的 条评论
为什么被折叠?



