String firstString = "Oak Maple Pine"
String secondString = "spruce Maple elm"
?
firstCompare.regionMatches(4, secondString, 7, 5)
?
Using the above code, what will be the Boolean value after execution of the regionMatches statement? Explain how the Strings are compared using the regionMatches() method.
What will be an ideal response?
TheregionMatches()method can be used to test whether twoStringregions are the same. One version of theregionMatches()method takes four arguments-the position at which to start in the calling String, the other String being compared, the position to start in the other String, and the length of the comparison.??The regionMatches() expression is true. The substring of firstString that starts at position 5 and continues for five characters is "Maple"; the substring of secondString that starts at position 7 and continues for five characters is also "Maple".
You might also like to view...
If a manager wants to ensure he has current data for decision making, he needs to regularly add new records to the table. The best way to do this is by using a(n) ________ query
A) make table B) update C) append D) delete
__________ are best for software applications.
A. Binary curves B. Prime curves C. Bit operations D. Abelian groups