invokeJavaMethod
Invoke a Java method.
y=invokeJavaMethod(javaObject, methodName, arg1, arg2,...)
Inputs
javaObject The Java object whose method is to be invoked.
methodName The name of the method to be invoked.
{arg1, arg2, ...} The input arguments to the method.
Outputs
y The result of invoking the specified method for the given arguments.


Description
Of course, the java method can be called directly as shown below.
Example
>>a=new Vector();
>>result=invokeJavaMethod(a,"add",2);
>>result=invokeJavaMethod(a,"add",5);
>>a
[2, 5]
>>b=new Vector();
>>r=b.add(20); // Direct call to java method.
>>r=b.add(50);
>>b
[20, 50]