java string matching problem
<p>I am facing a very basic problem. Some time small things can take your whole day :(
but thank to stackoverflow memebers who always try to help :)</p>

<p>I am trying to match 2 strings if they match it should return TRUE</p>

<p>now I am using this </p>

<pre><code>if (var1.indexOf(var2) &gt;= 0) {
return true;
}
</code></pre>

<p>But if var1 has value "maintain" and var2 has value "inta" or "ain" etc. it still return true :(.
Is there any way in java that can do full text matching not partial? 
For example </p>

<pre><code>if("mango"=="mango"){
return true;
}
</code></pre>

<p>thanks ! ! !</p>
