How to type the "or" symbol in java
In the English input method, press and hold the shift key and then Press right underline (the key between the backspace key and the enter key).
There are two "or"s:
1. | The expression will be judged before and after.
if(a==0 | b==0) // a==0与b==0,都会进行判断是真还是假
2. || has a short-circuit function. If the previous one is true, it will no longer be Determine the following expression
if(a==0 || b==0) // 如果a==0为真,那么就不再判断b==0是否为真,而直接执行下面的语句,如果a==0为假,才判断b==0是否为真
Recommended related articles and tutorials: java introductory tutorial
The above is the detailed content of How to type the 'or' symbol in java. For more information, please follow other related articles on the PHP Chinese website!