Found unexpected behaviour of find() method of Matcher in java
<pre><code>public class Test2 {

    public static void main(String[] args) 
    {
        String country="india";
        String arry[]={"indians are great","i am india","govt","dhoomindian","prashindiahim","i jdsdindi a","i n d i a"};
        Pattern p = Pattern.compile(".*" + country + ".*");
        for (String stringVal : arry) 
        {
            Matcher m = p.matcher(stringVal);
            System.out.println("test1..."+" --&gt;"+stringVal+"  "+m.find());
            System.out.println("test2..."+" --&gt;"+stringVal+"  "+m.find());
        }
    }
}


OUTPUT::

*test1... --&gt;indians are great  true*   ----1
**test2... --&gt;indians are great  false**-----2
*test1... --&gt;i am india  true*   ----3
**test2... --&gt;i am india  false** ---4
test1... --&gt;govt  false
test2... --&gt;govt  false
test1... --&gt;dhoomindian  true----5
test2... --&gt;dhoomindian  false----6
test1... --&gt;prashindiahim  true----7
test2... --&gt;prashindiahim  false----8
test1... --&gt;i jdsdindi a  false
test2... --&gt;i jdsdindi a  false
test1... --&gt;i n d i a  false
test2... --&gt;i n d i a  false
</code></pre>

<p>you can see the same find() method gives true in first line and false in the preceded second line.you can see the behaviour from line 1-8.
can any one tell me why i got this behaviour of find() method.</p>