posts - 15,  comments - 5,  trackbacks - 0
          class TestString {
           public static void main(String[] args) {
            String hello = "Hello", lo = "lo";
            System.out.print((hello == "Hello") + " ");
            System.out.print((Other.hello == hello) + " ");
            System.out.print((other.OtherString.hello == hello) + " ");
            System.out.print((hello == ("Hel" + "lo")) + " ");
            System.out.print((hello == ("Hel" + lo)) + " ");
            System.out.println((hello == ("Hel" + lo).intern()));
           }
          }

          class Other {
           static String hello = "Hello";
          }

          package other;
          public class OtherString {
           public static String hello = "Hello";
          }

          輸出結果是什么呢?:)
          posted on 2005-11-25 18:22 MudFish 閱讀(276) 評論(1)  編輯  收藏 所屬分類: JSP

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


          網站導航:
           
          主站蜘蛛池模板: 麟游县| 拉萨市| 济南市| 绩溪县| 措勤县| 桃江县| 林周县| 尚义县| 亚东县| 大洼县| 虞城县| 商南县| 华坪县| 错那县| 浦北县| 宁远县| 漯河市| 公主岭市| 启东市| 苗栗县| 临汾市| 肃南| 镇康县| 漳平市| 新巴尔虎左旗| 集安市| 城步| 新郑市| 蓬安县| 客服| 郁南县| 永清县| 荣昌县| 甘南县| 洛阳市| 河南省| 新乡市| 新泰市| 自治县| 贞丰县| 左贡县|