Categories:
.NET (357)
C (330)
C++ (183)
CSS (84)
DBA (2)
General (7)
HTML (4)
Java (574)
JavaScript (106)
JSP (66)
Oracle (114)
Perl (46)
Perl (1)
PHP (1)
PL/SQL (1)
RSS (51)
Software QA (13)
SQL Server (1)
Windows (1)
XHTML (173)
Other Resources:
What is the difference between the Boolean & operator and the && operator?
What is the difference between the Boolean & operator and the && operator?
✍: Guest
If an expression involving the Boolean & operator is evaluated, both operands are evaluated. Then the & operator is applied to the operand. When an expression involving the && operator is evaluated, the first operand is evaluated. If the first operand returns a value of true then the second operand is evaluated. The && operator is then applied to the first and second operands. If the first operand evaluates to false, the evaluation of the second operand is skipped.
Operator & has no chance to skip both sides evaluation and && operator does. If asked why, give details as above.
2012-07-03, 2636👍, 0💬
Popular Posts:
How To Use "IF" Statements on Multiple Conditions? - Oracle DBA FAQ - Understanding PL/SQL Language ...
What are secure and non-secure websites? A secure Website uses the Secure Socket Layer (SSL) protoco...
What is Shell scripting A shell script is a script written for the shell, or command line interprete...
What is difference between Association, Aggregation and Inheritance relationships? In object oriente...
What Is Posting? Posting is an event that writes Inserts, Updates and Deletes in the forms to the da...