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";
          }

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

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


          網(wǎng)站導(dǎo)航:
           
          主站蜘蛛池模板: 本溪| 壤塘县| 绩溪县| 达州市| 巴里| 米林县| 慈利县| 呼图壁县| 乳山市| 措勤县| 峨边| 中牟县| 始兴县| 信阳市| 老河口市| 兴仁县| 灵川县| 洪江市| 当阳市| 兴国县| 原阳县| 金山区| 公主岭市| 香河县| 吴忠市| 乐山市| 阜宁县| 乐东| 宜宾市| 陈巴尔虎旗| 栖霞市| 鸡泽县| 汉寿县| 合作市| 延寿县| 郯城县| 苍梧县| 芷江| 唐海县| 嘉兴市| 鱼台县|