class Person
{
int name;
static String county;
public Person(int name,String county){
this.name=name;
this.county=county;
}
void user() {
for (int count=1;count<=20;count++ )
{
Person p=new Person(count,county);
name=count;
System.out.println("姓名:"+name+"\t居住城市:"+county);
}
}
}
class qaq
{
public static void main(String[] args)
{
Person p=new Person(0,"襄樊");
p.user();
p.county="襄阳";
p.user();
}
}
为什么会这样???