07/10/25 01:14:47
>>375
コンストラクタ追加
public Meibo(){
this.name = "お前";
this.age = 23;
this.occupation = "自宅警備員";
}
public Meibo(String name){
this.name = name;
this.age = 60
this.occupation = "TBS";
}
public Meibo(String name,int age){
if(age <= 0)throws new IllegalArgumentException("age must be positive");
this.name = name;
this.age = age;
this.occupation = "ネトウヨ";
}