Java每日一题20161013

package Oct2016;

public class Ques1013{
    public static void main(String[] args){
        new Obj();
    }
}

class Obj{
    String name;
    Other other = new Other(); 

    public Obj(){
        this("Object");
        System.out.println("无参构造函数"); 
    }

    public Obj(String name){
        System.out.println("有参构造函数"); 
    }
}

class Other{
    public Other(){
        System.out.println("Other的构造函数"); 
    }
}

今日问题:
请问主程序输出结果是什么?(点击以下“Java每日一题20161013”查看昨天问题解析)

你可能感兴趣的:(Java每日一题20161013)