title: How to handle null string in java
body: <p>I am .net programmer and completely new in java. I am facing problem in handling null string in java. I am assigning value from string array to string variable completeddate.
  I tried all this but that didn't work.</p>
  
  <pre><code>String COMPLETEDATE;
  COMPLETEDATE = country[23];
  
  if(country[23] == null &amp;&amp; country[23].length() == 0) 
  {
      // ...
  }
  
  if (COMPLETEDATE.equals("null")) 
  {
      // ...
  }
  
  if(COMPLETEDATE== null)
  {
      // ...
  }
  
  if(COMPLETEDATE == null || COMPLETEDATE.equals("null"))
  {
      // ...
  }
  </code></pre>