How to compare two Strings 
<blockquote>
  <p><strong>Possible Duplicate:</strong><br>
  <a href="http://stackoverflow.com/questions/513832/how-do-i-compare-strings-in-java">How do I compare strings in Java?</a>  </p>
</blockquote>



<p>I'm requesting my JSP page in a simple manner:</p>

<pre><code>http://url/?loadtime=true
</code></pre>

<p>I've printed it out using <code>System.out.println("-"+request.getParameter("loadtime")+"-")</code> and it works fine.</p>

<p>However: I want to compare the value. But when I do this:</p>

<pre><code>if(request.getParameter("loadtime") == "true") {
    System.out.println("loadtime=true");
}
</code></pre>

<p>The conditional statements inside the if do not get executed, even though the "loadtime" parameter really is equal to "true".</p>

<p>Anyone know what could be the problem?</p>
