Thanks for taking the time by checking out this question. I have suddenly forgotten how method calls inside if-checks works. See the example code below.
Example:
if (list.next() instanceof AClass) {
AClass thing = list.next();
}
If next() iterates to the next object in a list, is the two list.next() items the same object?
Is the method calls inside if-checks "tested" and then "reverted" so the same method call in the body equals the same as the one in the if-check?
Thanks!
Aucun commentaire:
Enregistrer un commentaire