Java Interface >

MakeJavaObject

MakeJavaObject[expr]
constructs a new Java object whose "value" is expr.
  • It is typically used when you need to call a Java method that is typed to take Object, and you want to pass it a numeric, string, or array value. You use MakeJavaObject to manually convert such arguments into Java objects before passing them to the method.
  • expr must be an integer or real number, a String, a boolean, or a list or matrix of numbers, strings, or booleans.
  • For an integer expr, the created Java object is of type java.lang.Integer.
  • For a real, the created Java object is of type java.lang.Double.
  • For a String, the created Java object is of type java.lang.String.
  • For a boolean, the created Java object is of type java.lang.Boolean.
  • For a list or matrix of numbers, strings, or booleans, the created object is a Java array of the corresponding primitive type. For example, MakeJavaObject would create an with these values.
Ask a question about this page  |  Suggest an improvement  |  Leave a message for the team
Format:   HTML  |  CDF