title: textarea.getText() is not working properly in Java
body: <p>I have a JTextArea, and I'm trying to do a stupid test using textarea.getText()</p>
  
  <pre><code>if(textarea.getText() == "")
  {
      System.out.println("empty string");
  }
  </code></pre>
  
  <p>When I do this I don't get anything on the screen even if I leave the textarea empty or I type something inside of it.</p>
  
  <pre><code>if(textarea.getText() != "")
  {
      System.out.println("empty string");
  }
  </code></pre>
  
  <p>But when I do this one I get the "empty string" message in all cases.</p>
  
  <p>What's the problem here ?</p>