因简书改版后无法添加扩展链接,20170113问题解析请到公众号查看,问题解析在公众号首发,公众号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;
}
}
今日问题:
请问主程序输出结果是什么?