Name | boolean() |
||
---|---|---|---|
Examples | String s = "true"; boolean b = boolean(s); if (b) { println("The boolean is true"); } else { println("The boolean is false"); } |
||
Description | Converts a primitive datatype, string, or array to its boolean representation. The number 0 evaluates to false and all other numbers evaluate to true. | ||
Syntax | boolean(val) |
||
Parameters |
|
||
Returns | boolean | ||
Usage | Web & Application | ||
Related | boolean |