vendredi 26 août 2016

not equals not working in java

I tried the following code :

if (!object.equals(null)) {
                object.setItem(object2.getTime());
}

Here, object and object1 are objects two classes.

The problem is that it enter into the statement for a null value.

Aucun commentaire:

Enregistrer un commentaire