How to type the "amers" symbol in java
Use the "ampersand" symbol on the keyboard in javaShift The number 7 can be typed out. (Not the number 7 on the small keyboard)
&& in Java can be used as a logical AND operator to represent logical AND (and). When the results of the expressions on both sides of the operator are true, the entire operation The result is true, otherwise, as long as one party is false, the result is false.
Usage example:
int a = 1; String b = "abc"; if(a && b) { System.out.println("a 和 b都为真") }
(Related video tutorial sharing: java video tutorial)
Knowledge expansion: The difference between & and &&
"&" Regardless of whether the first judgment condition is true, the two conditions before and after the logical operator will be judged;
"&&", if the first condition is not true, the subsequent conditions will not be judged; the first condition Established, continue to judge the second condition.
The above is the detailed content of How to type the 'and' symbol in java. For more information, please follow other related articles on the PHP Chinese website!