Home > Java > Javagetting Started > How to type the 'or' symbol in java

How to type the 'or' symbol in java

angryTom
Release: 2020-02-04 10:25:45
Original
25789 people have browsed it

How to type the 'or' symbol in java

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,都会进行判断是真还是假
Copy after login

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是否为真
Copy after login

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!

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template