In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-15 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Internet Technology >
Share
Shulou(Shulou.com)06/02 Report--
Editor to share with you whether false refers to 1 or 0 in Java. I hope you will get something after reading this article. Let's discuss it together.
False is 0 false is a value of Boolean type, the value of Boolean variable is only false and true,0 is false, non-0 is true; Boolean variable can be used for logical expressions, that is, logical operations such as "or" and "not" and relational operations such as greater than less than.
False is 0. False is a Boolean value. Only false and true,0 are false for Boolean variables, and non-zero is true. (for example,-1 and 1 are both true).
Boolean variables can be used for logical expressions, that is, logical operations such as "or" and "not" and relational operations such as greater than less than, and the result of logical expression operation is true or false.
Boolean results are often used in conditional statements. Here is an example of Java syntax:
Bool (a & b) {System.out.println ("1"); / / only if an and b are true (that is, non-zero values), execute here} else if (b) {System.out.println ("2"); / / only if b is true (that is, non-zero values), execute here} else {System.out.println ("3"); / / execute here} if none of the previous conditions are met
So the output is: 3
After reading this article, I believe you have a certain understanding of "false refers to 1 or 0 in Java". If you want to know more about it, welcome to follow the industry information channel. Thank you for your reading!
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.