20170109问题解析请点击今日问题下方的“【Java每日一题】20170110”查看(问题解析在公众号首发,公众号ID:weknow619)
package Jan2017;
public class Ques0110{
public static void main(String[] args){
Person person = new Person("张三");
System.out.println("修改之前 " + person);
Ques0110.update(person);
System.out.println("修改之后 " + person);
}
public static void update(Person person){
person = new Person("李四");
}
}
class Person{
String name;
Person(String name){
this.name = name;
}
public String toString(){
return "name: " + name;
}
}
今日问题:
请问主程序修改后输出结果是?(点击以下“【Java每日一题】20170110”查看20170109问题解析)