Multiarrays can have any rank greater than or equal to zero. Their elements can have any standard Java type including primitive types, class types, and Java array types. They cannot, however, have multiarray type: multiarrays of multiarrays are specifically disallowed.
For multiarrays with elements of non-primitive type, conversions between
multiarrays are allowed, completely analogous to the corresponding conversions
between Java arrays. For example, a method with declaration:
In many respects multiarray types behave like Java reference types.
A variable of multiarray type always holds a reference to a multiarray
(or a null reference). In this example:
Technically however, a multiarray reference is not equivalent to
a Java reference. Multiarray references and Java references are not
interconvertible. If the method foo had been declared instead as
There is another related limitation in this mold: one cannot declare standard Java arrays with elements of multiarray type.
These limitations (which exist to simplify the translation scheme) may be slightly inconvenient, but they are not a serious obstacle in practice. One can declare classes with fields of multiarray type. So the user can create a wrapper class for any particular multiarray type. A wrapper object, containing a multiarray, can then be stored in an instance of a container class or a Java array.
To summarize part of this discussion: multiarrays of Java arrays are allowed; Java arrays of multiarrays are not allowed (while multiarrays containing objects as elements, and objects containing multiarrays as fields, are both allowed).