20170110問題解析請點擊今日問題下方的“【Java每日一題】20170111”查看(問題解析在公眾號首發,公眾號ID:weknow619)
package Jan2017; public class Ques0111 { public static void main(String[] args){ final Person p1 = new Person("張三"); final Person p2 = new Person("李四"); p1 = new Person("王五"); p2.setName("王五"); } } class Person{ private String name; Person(String name) { this.name = name; } public void setName(String name) { this.name = name; } }
今日問題:
請問主程序有無編譯錯誤?(點擊以下“【Java每日一題】20170111”查看20170110問題解析)
題目原發布於公眾號、簡書:【Java每日一題】20170111,【Java每日一題】20170111 (也可以掃描頭像二維碼查看)
weknow團隊已開通認證了分答,有問題也可以來咨詢,點擊分答就可以找到我了!!