package Nov2016; public class Ques1117 { public static void main(String[] args) { Sub sub = new Sub(); sub.doThing(); } } class Parent{ Parent(){ new Other(); } } class Sub extends Parent{ public void doThing(){ System.out.println("Sub doThing。。。"); } } class Other{ public Other(){ new Sub(); } }
今日問題:
請問主程序運行結果是什麼?(點擊以下“【Java每日一題】20161117”查看20161116問題解析)
題目原發布於公眾號、簡書:【Java每日一題】20161117,【Java每日一題】20161117