title: Difference between isEmpty() and zero length
body: <p>What is the difference between these two methods?</p>
  
  <pre><code>public boolean nameControl(String str) 
  {
      if (str.trim().isEmpty()) return false;
      if (str.trim().length() == 0) return false;
      return true;
  }
  </code></pre>
  
  <p>I need find out that <code>str</code> should have at least one character.</p>