title: Why is "F" + "alse" not == "False"?
body: <blockquote>
    <p><strong>Possible Duplicate:</strong><br>
    <a href="https://stackoverflow.com/questions/513832/how-do-i-compare-strings-in-java">How do I compare strings in Java?</a>  </p>
  </blockquote>
  
  
  
  <p>I cant understand why the declared variables is not the same. </p>
  
  <p>ex code:</p>
  
  <pre><code> String firstPart = "F";
   String whole = "False";
   String connected = firstPart + "alse";
   System.out.println(connected == whole);
  </code></pre>
  
  <p>Now this produce a boolean and I thought it would be 'true' BUT it is not, It comes out as false and I don't understand why.</p>
  
  <p>Can someone explain this?</p>