I'm trying to understand the difference in use of these two class methods Matcher , but I could not quite understand the description of the documentation that says:
public boolean matches ()
Attempts to match the entire region against the pattern.public boolean find ()
Attempts to find the next subsequence of the input sequence that matches the pattern.
This method starts at the beginning of this matcher's region, or, if a previous invocation of the method was successful and the matcher has not been reset, at the first character matched by the previous match.
What is the difference in use between these two methods? If possible, I would like to see the difference exemplified.