20170113問題解析請點擊今日問題下方的“【Java每日一題】20170116”查看(問題解析在公眾號首發,公眾號ID:weknow619)
package Jan2017; public class Ques0116 { public static void main(String[] args) { System.out.println(new BigDog("大黑狗", "黑色")); } } class Dog{ String name; public Dog(String name) { super(); this.name = name; } public String toString(){ return "name:"+name; } } class BigDog extends Dog{ String color; public BigDog(String name, String color) { this.name = name; this.color = color; } public String toString(){ return "name:"+name+", color:"+color; } }
今日問題:
請問主程序輸出結果是什麼?(點擊以下“【Java每日一題】20170116”查看20170113問題解析)
題目原發布於公眾號、簡書:【Java每日一題】20170116,【Java每日一題】20170116 (也可以掃描頭像二維碼查看)
weknow團隊已開通認證了分答,有問題也可以來咨詢,點擊分答就可以找到我了!!