<ruby id="bdb3f"></ruby>

    <p id="bdb3f"><cite id="bdb3f"></cite></p>

      <p id="bdb3f"><cite id="bdb3f"><th id="bdb3f"></th></cite></p><p id="bdb3f"></p>
        <p id="bdb3f"><cite id="bdb3f"></cite></p>

          <pre id="bdb3f"></pre>
          <pre id="bdb3f"><del id="bdb3f"><thead id="bdb3f"></thead></del></pre>

          <ruby id="bdb3f"><mark id="bdb3f"></mark></ruby><ruby id="bdb3f"></ruby>
          <pre id="bdb3f"><pre id="bdb3f"><mark id="bdb3f"></mark></pre></pre><output id="bdb3f"></output><p id="bdb3f"></p><p id="bdb3f"></p>

          <pre id="bdb3f"><del id="bdb3f"><progress id="bdb3f"></progress></del></pre>

                <ruby id="bdb3f"></ruby>

                合規國際互聯網加速 OSASE為企業客戶提供高速穩定SD-WAN國際加速解決方案。 廣告
                java中==比較的是兩個字符串的是否同一個對象 ***** ``` // "static void main" must be defined in a public class. public class Main { public static void main(String[] args) { // initialize String s1 = "Hello World"; System.out.println("s1 is \"" + s1 + "\""); String s2 = s1; System.out.println("s2 is another reference to s1."); String s3 = new String(s1); System.out.println("s3 is a copy of s1."); // compare using '==' System.out.println("Compared by '==':"); // true since string is immutable and s1 is binded to "Hello World" System.out.println("s1 and \"Hello World\": " + (s1 == "Hello World")); // true since s1 and s2 is the reference of the same object System.out.println("s1 and s2: " + (s1 == s2)); // false since s3 is refered to another new object System.out.println("s1 and s3: " + (s1 == s3)); // compare using 'equals' System.out.println("Compared by 'equals':"); System.out.println("s1 and \"Hello World\": " + s1.equals("Hello World")); System.out.println("s1 and s2: " + s1.equals(s2)); System.out.println("s1 and s3: " + s1.equals(s3)); // compare using 'compareTo' System.out.println("Compared by 'compareTo':"); System.out.println("s1 and \"Hello World\": " + (s1.compareTo("Hello World") == 0)); System.out.println("s1 and s2: " + (s1.compareTo(s2) == 0)); System.out.println("s1 and s3: " + (s1.compareTo(s3) == 0)); } } ``` ***** ``` // "static void main" must be defined in a public class. public class Main { public static void main(String[] args) { String s1 = "Hello World"; // 1. concatenate s1 += "!"; System.out.println(s1); // 2. find System.out.println("The position of first 'o' is: " + s1.indexOf('o')); System.out.println("The position of last 'o' is: " + s1.lastIndexOf('o')); // 3. get substring System.out.println(s1.substring(6, 11)); } } ```
                  <ruby id="bdb3f"></ruby>

                  <p id="bdb3f"><cite id="bdb3f"></cite></p>

                    <p id="bdb3f"><cite id="bdb3f"><th id="bdb3f"></th></cite></p><p id="bdb3f"></p>
                      <p id="bdb3f"><cite id="bdb3f"></cite></p>

                        <pre id="bdb3f"></pre>
                        <pre id="bdb3f"><del id="bdb3f"><thead id="bdb3f"></thead></del></pre>

                        <ruby id="bdb3f"><mark id="bdb3f"></mark></ruby><ruby id="bdb3f"></ruby>
                        <pre id="bdb3f"><pre id="bdb3f"><mark id="bdb3f"></mark></pre></pre><output id="bdb3f"></output><p id="bdb3f"></p><p id="bdb3f"></p>

                        <pre id="bdb3f"><del id="bdb3f"><progress id="bdb3f"></progress></del></pre>

                              <ruby id="bdb3f"></ruby>

                              哎呀哎呀视频在线观看