阿里巴巴校園招聘筆試題

          Posted on 2009-09-26 18:38 Robert Su 閱讀(631) 評論(1)  編輯  收藏 所屬分類: Java
          public class B extends Object{
                  
          static{System.out.println("Load B");
              }

              
          public B(){
                  System.out.println(
          "Create B");
              }

          }

          public class A extends B{
              
          static {
                  System.out.println(
          "Load A");
              }

              
          public A(){
                  System.out.println(
          "Create A");
              }

          }

          public class testClass {
              
          public static void main(String[] args){
                  
          new A();
              }


          }
          寫出程序運行結果:

          Load B
          Load A
          Create B
          Create A

          歡迎大家留言發散討論

          Feedback

          # re: 阿里巴巴校園招聘筆試題  回復  更多評論   

          2010-04-10 13:20 by 金峰
          LoadA

          posts - 103, comments - 104, trackbacks - 0, articles - 5

          Copyright © Robert Su

          主站蜘蛛池模板: 青神县| 汉阴县| 商都县| 大余县| 桐城市| 定结县| 广宗县| 榕江县| 山西省| 高碑店市| 邻水| 临漳县| 壶关县| 绍兴县| 老河口市| 博罗县| 万载县| 三门峡市| 莱芜市| 临汾市| 涞源县| 长春市| 东宁县| 邯郸市| 墨玉县| 三河市| 毕节市| 象州县| 泗洪县| 文化| 北川| 招远市| 中卫市| 宝丰县| 镇坪县| 宝应县| 苍梧县| 紫云| 曲沃县| 梨树县| 丹阳市|