class person{
String name;
int age;
static String country;
public person(){}
public person(String name,int age){
this.name=name;
this.age=age;
}
public person(String name,int age,String country){
this.name=name;
this.age=age;
this.country=country;
}
public void show(){
System.out.println("姓名是: "+name+" 年龄 "+age+" 国家 "+country);
}
}
class persontest{
public static void main(String [] args){
person p1=new person("大致",11,"中国");
p1.show();
person p2=new person("小明",11);
p2.show();
person p3=new person("小刚",11);
p3.show();
p3.country="美国";
p1.show();
p2.show();
p3.show();
}
}