數(shù)據(jù)加載中……
          java1.5注解(二)

          import java.util.Date;
          import java.util.Map;
          import java.util.TreeMap;
          class  SuppressWarningsTest
          {
              
          public static void main(String[] args) 
              
          {
                  Map
          <String,Date> map=new TreeMap<String,Date>();
                  map.put(
          "hello",new Date());
                  System.out.println(map.get(
          "hello"));
              }

          }





          import java.util.Date;
          import java.util.Map;
          import java.util.TreeMap;
          class  SuppressWarningsTest2
          {
              
          public static void main(String[] args) 
              
          {
                  Map map
          =new TreeMap();
                  
          //Map<String,Date> map=new TreeMap<String,Date>();
                  map.put("hello",new Date());
                  System.out.println(map.get(
          "hello"));
              }

          }




          import java.util.Date;
          import java.util.Map;
          import java.util.TreeMap;
          class  SuppressWarningsTest3
          {
              @SuppressWarnings(
          "unchecked")
              
          public static void main(String[] args) 
              
          {
                  Map map
          =new TreeMap();
                  
          //Map<String,Date> map=new TreeMap<String,Date>();
                  map.put("hello",new Date());
                  System.out.println(map.get(
          "hello"));
              }

          }






          import java.util.Date;
          import java.util.Map;
          import java.util.TreeMap;
          class DeprecatedTest 
          {
              
          public void doSomething(){
              System.out.println(
          "guoxinghua");
              }

              
          public static void main(String[] args) 
              
          {
                  DeprecatedTest test
          =new DeprecatedTest();
                  test.doSomething();
                  
              }

          }


          class  SuppressWarningsTest2
          {
              
          public static void main(String[] args) 
              
          {
                  Map map
          =new TreeMap();
                  
          //Map<String,Date> map=new TreeMap<String,Date>();
                  map.put("hello",new Date());
                  System.out.println(map.get(
          "hello"));
              }

          }




          import java.util.Date;
          import java.util.Map;
          import java.util.TreeMap;
          class DeprecatedTest 
          {
              
          public void doSomething(){
              System.out.println(
          "guoxinghua");
              }

              
          public static void main(String[] args) 
              
          {
                  DeprecatedTest test
          =new DeprecatedTest();
                  test.doSomething();
                  
              }

          }


          class  SuppressWarningsTest2
          {
              @SuppressWarnings(
          {"unchecked","deprecation"})
              
          public static void main(String[] args) 
              
          {
                  Map map
          =new TreeMap();
                  
          //Map<String,Date> map=new TreeMap<String,Date>();
                  map.put("hello",new Date());
                  System.out.println(map.get(
          "hello"));
                  DeprecatedTest test
          =new DeprecatedTest();
                  test.doSomething();
              }

          }


          posted on 2008-10-26 00:21 郭興華 閱讀(361) 評論(0)  編輯  收藏


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


          網(wǎng)站導(dǎo)航:
           
          主站蜘蛛池模板: 彭州市| 浦北县| 百色市| 营山县| 二手房| 临安市| 秦安县| 南汇区| 兴和县| 扎赉特旗| 凤翔县| 腾冲县| 德格县| 奉节县| 西昌市| 随州市| 遵义市| 简阳市| 鹰潭市| 铁力市| 前郭尔| 辰溪县| 盐城市| 古浪县| 方正县| 涪陵区| 太湖县| 垫江县| 木兰县| 姚安县| 海林市| 凭祥市| 榆社县| 安远县| 深水埗区| 盐城市| 丰县| 建德市| 九江市| 乳山市| 丹阳市|