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 - The start offset of the sub-area in the string. // Other - String parameters. // OOFFSET - The start offset of the subregion in the parameter string. // LEN - The number of characters to be compared. // Returns true if the specified sub-area of the string is accurately matched in the specified subregion in the parameter string, otherwise returns false. // Str> Temp Returns false // str = Temp Returns TRUESYSTEM.Println (bool);}}