Functional Area : Using Java Objects and Arrays

Java objects, when returned by function calls, can be used almost like any JudoScript objects. One difference is that, while JudoScript functions and methods can take any number of parameters, Java methods take predetermined number (and types) of parameters. For overloaded Java methods, JudoScript is pretty intelligent to pick the right method to call based on the parameter number and types, but there are situations where explicit casting is needed. Casting is normally needed only for primitive types, but you may want to cast a Java object to a different type via the Java object's built-in .cast() method.

Any Java objects, including arrays, in JudoScript are wrapped in a standard .

Java objects and arrays can be created via the javanew operator. If the class's constructor takes no parameters, no parentheses are needed; otherwise, just specify as any legitimate Java method calls.

Related Syntax

Related Object Types