一路拾遺
          Collect By Finding All The Way ......
          posts - 81,comments - 41,trackbacks - 0
          public static void main(String[] args) {
            Integer a ;
            Integer b ;

            a
          =16;
            b
          =16;

            System.out.println(a 
          == b);
            System.out.println(a.equals(b));
          }
          輸出true  true

          public static void main(String[] args) {
          Integer a ;
          Integer b ;

          a
          =128;
          b
          =128;

          System.out.println(a 
          == b);
          System.out.println(a.equals(b));
          }

          輸出false true

          public static void main(String[] args) {
          Integer a 
          = new Integer(5);
          Integer b 
          = new Integer(5);

          System.out.println(a 
          == b);
          System.out.println(a.equals(b));
          }
          輸出false ture
          posted on 2010-05-27 16:19 胖胖泡泡 閱讀(197) 評論(0)  編輯  收藏

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


          網站導航:
           
          主站蜘蛛池模板: 航空| 九江市| 句容市| 崇仁县| 平陆县| 哈尔滨市| 汝阳县| 奉节县| 贺州市| 徐水县| 温宿县| 霍州市| 凤台县| 原阳县| 陆良县| 太白县| 遵义市| 阳谷县| 咸宁市| 富源县| 贡嘎县| 苏尼特右旗| 林口县| 青冈县| 铜川市| 嵊州市| 讷河市| 攀枝花市| 巨野县| 丰台区| 清新县| 淮南市| 渝北区| 郎溪县| 衡阳市| 中西区| 靖江市| 敦化市| 保定市| 临江市| 澄江县|