Documentation

This is machine translation

Translated by Microsoft
Mouse over text to see original. Click the button below to return to the English verison of the page.

我们为许可用户提供了部分翻译好的中文文档。您只需登录便可查阅这些文档

javaObject

Call Java constructor

Syntax

  • JavaObj = javaObject(ClassName,x1,...,xN)
    example

Description

example

JavaObj = javaObject(ClassName,x1,...,xN) returns Java® object array, JavaObj, created by the Java constructor for the class with the argument list matching x1,...,xN.

Examples

collapse all

Create a Java® object strObj of class java.lang.String.

strObj = javaObject('java.lang.String','hello');

Input Arguments

collapse all

Name of a Java class, specified as a character vector.

Data Types: char

Java constructor input arguments, 1 through N (if any), required by ClassName, specified by any type. The class constructor argument list specifies the argument type.

Introduced before R2006a


Was this topic helpful?