samedi 5 mars 2016

A test for even/odd Java

Would this test work?:

if (testInt/2).ofType(Integer){
    //to-do if even
}

I assume it would iff the compiler resolves testInt/2 before ofType(); is this the case??

Aucun commentaire:

Enregistrer un commentaire