Hello,
in this case (with variable A being false) the expression foo() right to the && operator is not evaluated. The method is thus not invoked. The logical operators && and || stop the evaluation as soon as the result of the expression is determined. In this case the value false in operand A affects the entire expression to return false.
I hope it helps you further.
Best regards
Paul Banach