title: not equals not working in java
body: <p>I tried the following code :</p>
  
  <pre><code>if (!object.equals(null)) {
                  object.setItem(object1.getTime());
  }
  </code></pre>
  
  <p>Here, <strong>object</strong> and <strong>object1</strong> are objects of two classes.</p>
  
  <p>The problem is that it enter into the statement for a <strong>null</strong> value.</p>