Java String regionMatches() 方法


Java String regionMatches() 方法

import java.io.*;

public class Test {



   public static void main(String args[]) {

      String Str1 = new String("Welcome to codingdict.com");

      String Str2 = new String("Tutorials");

      String Str3 = new String("TUTORIALS");



      System.out.print("Return Value :" );

      System.out.println(Str1.regionMatches(11, Str2, 0, 9));



      System.out.print("Return Value :" );

      System.out.println(Str1.regionMatches(11, Str3, 0, 9));

   }

}