Boolean

The true and false logical truth values are represented by the Boolean type:

var t: Boolean = true
var f: Boolean = false

Boolean values are operated upon by the &&, ||, and ! logical operators:

Operator name

Operator

Description

Operator type

Conjunction

&&

Evaluates to true when two of its operands are true, otherwise evaluates to false.

Binary

Disjunction

||

Evaluates to true when at least one operand is true, otherwise evaluates to false.

Binary

Negation

!

Inverts the value of its Boolean operand.

Unary

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
13.59.48.161