一路拾遺
          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)  編輯  收藏

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


          網站導航:
           
          主站蜘蛛池模板: 陈巴尔虎旗| 大悟县| 德安县| 孝感市| 洛南县| 于都县| 桓台县| 阜宁县| 开鲁县| 博客| 安岳县| 师宗县| 湖南省| 宝清县| 宣威市| 德清县| 山阳县| 介休市| 眉山市| 肃南| 大余县| 蓬溪县| 房产| 瓦房店市| 衡南县| 景宁| 隆化县| 柘荣县| 白城市| 漳浦县| 谷城县| 琼海市| 衡阳县| 望城县| 封开县| 沛县| 化隆| 广汉市| 罗源县| 白沙| 铜梁县|