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
Name | Type | Required | Default | Description |
---|---|---|---|---|
type | string | Yes | The name of a Java primitive or a Java class name. | |
variable | string | Yes | A variable, Java object or array. |
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) )