if (x != y) { // tests if x is not equal to y // do something only if the comparison result is true }