package ch7;
import java.util.Vector;
public class Untitled1 {
public Untitled1() {
}
public static void main(String[] args) {
Untitled1 u = new Untitled1();
String str = "123456789";
String temp = "123456789";
boolean bool = str.regionMatches(2, temp, 3, 3);
//toffset - 该字符串中子区域的开始偏移量。
//other - 字符串参数。
//ooffset - 参数字符串中子区域的开始偏移量。
//len - 要比较的字符数。
//若该字符串的指定子区域精确匹配参数字符串中的指定子区域则返回 true ,否则返回 false 。
//str > temp 返回false
//str < temp 返回false
//str = temp 返回true
System.out.println(bool);
}
}