当前位置:网站首页>Pits encountered in the use of boolean type in development

Pits encountered in the use of boolean type in development

2022-07-05 15:58:00 Ant HJK

In the development, I first define a boolean variable

Then when we make a logical judgment on the set, we find if The judgment condition does not judge the boolean type

reason : Because when multiple conditions are judged, judge from left to right

First s&& Strings.contains(555") The judgment is false

However, the latter is or || At this time of judgment Strings.contains("444") by true

So I went in

原网站

版权声明
本文为[Ant HJK]所创,转载请带上原文链接,感谢
https://yzsam.com/2022/186/202207051526233224.html