if (x == 0);
y = 0;
will always execute the assignment statement and set y to 0.
if (x = false)
assigns false to x, and will always evaluate to be false, and:
if (x = true)
will assign true to x, and will always evaluate to true.
if (x >= 18)
stringObj="more than 18";
rc = 18;
will always execute the assignment statement and set rc to 18.