Conversion from a boolean
| Target data type | Behavior |
|---|---|
| String | Returns the value as a string: true is converted to "true" and false is converted to "false". |
| Integer | Returns 1 if the value is true and 0 if the value is false. This conversion can cause a loss of data. |
| Decimal | Returns 1 if the value is true and 0 if the value is false. This conversion can cause a loss of data. |
| Double | Returns 1.0D if the value is true and 0.0D if the value is false. This conversion can cause a loss of data. |
| Float | Returns 1.0F if the value is true and 0.0F if the value is false. This conversion can cause a loss of data. |
| Long | Returns 1L if the value is true and 0L if the value is false. This conversion can cause a loss of data. |