false is 1 or 0
false is 0, false is a Boolean value. The only values of Boolean variables are false and true, 0 is false, and non-0 is true; Boolean variables can be used in logical expressions, that is, " Logical operations such as "OR", "AND" and "Not" and relational operations such as greater than less than.
#The operating environment of this article: Windows 7 system, Dell G3 computer.
false is 0. False is a Boolean value. The only values of Boolean variables are false and true, 0 is false, and non-0 is true. (For example -1 and 1 are both true).
Boolean variables can be used in logical expressions, that is, logical operations such as "or", "and" and "not" and relational operations such as greater than or less. The result of the logical expression operation is true or false. .
Boolean operation results are often used in conditional statements. The following is an example of Java syntax:
bool a=1; bool b=0; if (a && b) { System.out.println("1");// 只有a和b都为true时(即非0值),执行此处 }else if(b){ System.out.println("2");//只有b为true时(即非0值),执行此处 }else{ System.out.println("3");// 当前面条件都不满足时执行此处 }
So the output result is: 3
For more related knowledge, please visit PHP Chinese website!
The above is the detailed content of false is 1 or 0. For more information, please follow other related articles on the PHP Chinese website!

Hot AI Tools

Undresser.AI Undress
AI-powered app for creating realistic nude photos

AI Clothes Remover
Online AI tool for removing clothes from photos.

Undress AI Tool
Undress images for free

Clothoff.io
AI clothes remover

AI Hentai Generator
Generate AI Hentai for free.

Hot Article

Hot Tools

Notepad++7.3.1
Easy-to-use and free code editor

SublimeText3 Chinese version
Chinese version, very easy to use

Zend Studio 13.0.1
Powerful PHP integrated development environment

Dreamweaver CS6
Visual web development tools

SublimeText3 Mac version
God-level code editing software (SublimeText3)

Hot Topics

