BackPrevious Page Next PageNext

Boolean

x || y

x && y

!x

Below is a set of truth tables showing the logic operations for 3-valued logic.

A AND B True False Null
True True False Null
False False False False
Null Null False Null

 

A OR B True False Null
True True True True
False True False Null
Null True Null Null

 

A NOT A
True False
False True
Null Null

Boolean x || Boolean y

Returns true if x is true or y is true.

Examples

Boolean x && Boolean y

Returns true if x is true and y is true.

Examples

! Boolean x

Returns true if x is false.

Example

The return value of the following statement is def.

Integer s=4, d=8;
Integer f=6;
if ( ! ( f>s ) )
return  "abc"
else
return "def"

BackPrevious Page Next PageNext