The find() method of Matcher Class attempts to find the next subsequence of the input sequence that find the pattern. It returns a boolean value showing the same.
public boolean find()
Parameters: This method do not takes any parameter.
Return Value: This method returns a boolean value showing whether a subsequence of the input sequence find this matcher’s pattern
Below examples illustrate the Matcher.find() method:
Reference: Oracle Doc
Attention reader! Don’t stop learning now. Get hold of all the important Java Foundation and Collections concepts with the Fundamentals of Java and Java Collections Course at a student-friendly price and become industry ready.