一路拾遺
          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 胖胖泡泡 閱讀(192) 評論(0)  編輯  收藏

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


          網(wǎng)站導(dǎo)航:
           
          主站蜘蛛池模板: 七台河市| 马关县| 吉安县| 徐汇区| 扎赉特旗| 华蓥市| 霍州市| 囊谦县| 城固县| 会宁县| 武安市| 临夏县| 马尔康县| 泰宁县| 东城区| 衡水市| 宁南县| 芜湖市| 白水县| 奉贤区| 曲周县| 屏南县| 西畴县| 永清县| 瑞昌市| 黄平县| 鄂尔多斯市| 日喀则市| 北辰区| 兰溪市| 渑池县| 江西省| 西安市| 阳城县| 仪征市| 余江县| 阜城县| 唐海县| 康马县| 合山市| 安庆市|