一路拾遺
          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) 評(píng)論(0)  編輯  收藏

          只有注冊(cè)用戶(hù)登錄后才能發(fā)表評(píng)論。


          網(wǎng)站導(dǎo)航:
           
          主站蜘蛛池模板: 托里县| 梅河口市| 洛南县| 肥乡县| 赞皇县| 牟定县| 会昌县| 全州县| 岑巩县| 卢龙县| 化德县| 巴林左旗| 武平县| 成武县| 巨野县| 无极县| 清丰县| 龙海市| 双辽市| 凤凰县| 铜陵市| 河间市| 汉阴县| 习水县| 奉化市| 格尔木市| 彭州市| 丰县| 自贡市| 德惠市| 南溪县| 佛教| 蓬溪县| 盐池县| 邵阳市| 基隆市| 广丰县| 子长县| 兴隆县| 唐山市| 石景山区|