9910

          單飛

             :: 首頁 :: 聯系 :: 聚合  :: 管理

          公告

          Coding is Everything

          常用鏈接

          留言簿(11)

          我參與的團隊

          搜索

          •  

          最新評論

          閱讀排行榜

          1.關于接口中聲明的變量

          public interface In {
          /*public static final*/ int a = 0;
          }
          public class TestIn implements In{

              /**
               * @param args
               */
              public static void main(String[] args) {
                  // TODO Auto-generated method stub
                  int i=0;
                  TestIn t = new TestIn();
                  i = t.a;
                  i = In.a;
                  i = TestIn.a;
              }

          }

          2.Exception
          public class LException extends Exception{

          }

          public class HException extends LException{

          }
          public class TestException {

              /**
               * @param args
               */
              public static void main(String[] args) {
                  // TODO Auto-generated method stub
                  try{
                      throw new HException();
                  }catch(HException ex){
                     
                  }catch(LException e){
                     
                  }
              }

          }



          posted on 2009-01-19 23:54 單飛 閱讀(156) 評論(0)  編輯  收藏

          只有注冊用戶登錄后才能發表評論。


          網站導航:
           
          主站蜘蛛池模板: 含山县| 崇州市| 白银市| 哈尔滨市| 宜昌市| 永和县| 阿坝县| 荥经县| 二手房| 新干县| 宜昌市| 五河县| 通许县| 宁乡县| 崇义县| 新干县| 安新县| 涿州市| 台东县| 都匀市| 霞浦县| 五台县| 迭部县| 札达县| 建瓯市| 山丹县| 永城市| 扶余县| 广东省| 孟津县| 弥勒县| 邢台县| 达拉特旗| 沐川县| 青铜峡市| 奎屯市| 延川县| 西宁市| 望谟县| 安多县| 班戈县|