samedi 10 octobre 2015

Java If block with multiple statements

I have a question about IF clause in Java. I have and expression:

if ((someObject != null & connectedToTheInternet) || operate) {
    // some action
}

Is my logic right: if someObject != null equals to true and connectedToTheInternet equals false then we have (someObject != null & connectedToTheInternet) equals false and then we have the following block:

if (false || operate) {
   // some action
}

And if operate equals true then // some action will be triggered?

Aucun commentaire:

Enregistrer un commentaire