Q: Which among the following is a Short Circuit OR operator?
Solution: Two Pipes ||
Q: What is the output of a Logical OR (|) operation if one of the inputs/operands is false?
Solution: Logical OR operator give true as output if at least one of the operands is true.
Q: What is the output of Logical AND (&) operation if one of the inputs/operands is false?
Solution: false & (anything) is false.
Q: What is the output of a Logical OR (|) operation if one of the inputs/operands is true?
Solution: true | (anything) is true.
Q: What is the output of a Logical AND (&) operation if one of the inputs/operands is true?
Solution: true & (anything) = true or false
Q: What is the output of a Logical AND (&) operation if both inputs/operands are true?
Solution: no solution
Q: What is the output of a Logical OR (|) operation if both the inputs/operands are true?
Solution: no solution
Q: Which is fast among AND (&) and Short Circuit AND(&&) operators in Java?
Solution: no solution
Q: Which is fast among OR(|) and Short Circuit OR (||) operators in Java?
Solution: no solution
Q: Why are Short Circuit AND (&&) and Short Circuit OR (||) operators are fast in Java?
Solution: Short Circuit operators are not 100% every time. Based on the value of the First operand, they decide whether to go evaluating the second expression.
You Have Score    | /10 |