22 - Short Circuit Logical Operators (&&) (||) in Java (Hindi/Urdu)
LIKE, SHARE & SUBSCRIBE In this video, we are going to discuss "Short-Circuit Boolean Logical Operators in Java". Short-Circuit operators are used to increase the speed and performance of our Java program. It is a boolean operator which is basically used to check and verify some conditions and statements of our code and generate a boolean status according to it. There are 2 types of short-circuit operators in Java: 1) Short-Circuit AND Operator (&&) 2) Short-Circuit OR Operator (||) The OR operator results in TRUE when a single operand results TRUE, no matter what other operand results. Similarly, the AND operator results in FALSE when a single operand results FALSE, no matter what other operand results. If we use the || and && forms, rather than the | and & forms of these operators, Java will not bother to evaluate the righthand operand when the outcome of the expression can be determined by the left operand alone. In case of short circuit logical operators left operand is evaluated first because the associativity of the boolean logical operator is left to right. Video for Boolean Logical Operators: https://youtu.be/q2jFEO2Yuyk Thanks for watching & stay tuned. Like us on Facebook - https://goo.gl/y7oxYc Follow us on Twitter - https://goo.gl/UKmTfn
Download
0 formatsNo download links available.