Conversion from an integer
Target data type | Behavior | Examples |
---|---|---|
String | Returns the value as a string. | 42 is converted to "42". |
Boolean | Returns false if the value is 0 and true otherwise. This conversion can cause a loss of data. | 42 is converted to true. |
Decimal | Returns the value as a decimal. | 42 is converted to 42. |
Double | Returns the value as a double. | 42 is converted to 42.0D. |
Float | Returns the value as a float. | 42 is converted to 42.0F. |
Long | Returns the value as a long. | 42 is converted to 42L. |