求各位大神答疑解惑
class Person{
private String name = "哈哈,我是假的李四";
private int age;
Person(String name){
name = name;
}
public void speak(){
System.out.println("name="+name);
}
}
class PersonDemo
{
public static void main(String[] args){
Person p = new Person("我是真的李四");
p.speak();
}
}
为何最后显示的是 我是假的李四,我就想知道这个逻辑