1. When || a||b is short-circuited or ab is all false, the calculation result is false, otherwise it is true. 2<1||3>4 false
The specific explanation is: || means or, as long as one is true, the result is true, and the result is false if two are false
2.&& a&&b short circuit and ab are all true, calculate The result is true, otherwise false. 2>1&&3<4 true
The specific explanation is: && means and, as long as one is false, the result is false, and two are true, the result is true. For details,
please refer to the following picture usage
What does Java's || or && mean? (expresses or) (expresses and)
Guess you like
Origin blog.csdn.net/qq_36570506/article/details/131429840
Recommended
Ranking