Converts the data type of a CFML variable to pass as an argument to an overloaded method of a Java object.
javaCast(type, variable)
→ returns any
boolean
double
float
int
long
string
null
byte
bigdecimal
char
short
Converts the number 180.0 degrees to radians using Java method: Math.toRadians(double degrees)
createObject("java", "java.lang.Math").toRadians( javaCast("double", 180.0) )
Expected Result: 3.14159265359
Signup for cfbreak
to stay updated on the latest news from the ColdFusion / CFML community. One email, every friday.