boolean()DataConversionWeb & Application
float f = 0.0;
boolean b = boolean(f);
println(f + " : " + b); // Prints "0.0 : false"
int i = 1;
b = boolean(i);
println(i + " : " + b); // Prints "1 : true"
i = 3445;
b = boolean(i);
println(i + " : " + b); // Prints "3445 : true"
Converts a primitive datatype, string, or array to its boolean representation. The number 0 evaluates to false and all other numbers evaluate to true.
boolean(val)
int, float, char, byte, String, int[], float[], char[], byte[], String[]byte
boolean
1.0FunctionIDE