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, 2338👍, 0💬
Popular Posts:
Can you explain why your project needed XML? Remember XML was meant to exchange data between two ent...
What is NullPointerException and how to handle it? When an object is not initialized, the default va...
Can we have static indexer in C# ? No.
What are the types of variables x, y, y and u defined in the following code? #define Atype int* type...
How To Call a Sub Procedure? - Oracle DBA FAQ - Creating Your Own PL/SQL Procedures and Functions To...