20170309问题解析请点击今日问题下方的“【Java每日一题】20170310”查看(问题解析在公众号首发,公众号ID:weknow619)
package Mar2017; public class Ques0310 { static void test() { System.out.println("test method in Test class"); } public static void main(String[] args) { Ques0310 test = new Ques0310(); test.test(); Sub sub = new Sub(); sub.test(); test = sub; test.test(); sub = test; sub.test(); } } class Sub extends Ques0310 { static void test() { System.out.println("test method in Sub class"); } }
今日问题:
请问主程序运行结果是什么?(点击以下“【Java每日一题】20170310”查看20170309问题解析) 题目原发布于公众号、简书:, (也可以扫描头像二维码查看)