External Interfaces Previous page   Next Page

Java Objects

When a method call returns Java objects, MATLAB leaves them in their original form. They remain as Java objects so you can continue to use them to interact with other Java methods.

The only exception to this is when the method returns data of type, java.lang.Object. This class is the root of the Java class hierarchy and is frequently used as a catchall for objects and arrays of various types. When the method being called returns a value of the Object class, MATLAB converts its value according to the table, Conversion of Java Types to MATLAB Types. That is, numeric and boolean objects such as java.lang.Integer or java.lang.Boolean convert to a 1-by-1 MATLAB matrix of double. Object arrays of these types convert to the MATLAB data types listed in the right-hand column of the table. Other object types are not converted.


Previous page  Built-In Data Types Converting Objects to MATLAB Data Types Next page

© 1994-2005 The MathWorks, Inc.