reference
arrayref to the new array is pushed onto the operand stack.
Linking Exceptions
During resolution of the CONSTANT_Class
constant pool item, any of the exceptions documented in §5.1 can be thrown.
Otherwise, if the current class does not have permission to access the base class of the resolved array class, multianewarray throws an IllegalAccessError
.
Runtime Exception
Otherwise, if any of the dimensions values on the operand stack is less than zero, the multianewarray instruction throws a Negative
ArraySizeException
.
Notes
It may be more efficient to use newarray or anewarray when creating an array of a single dimension.
The array class referenced via the constant pool instruction may have more dimensions than the dimensions operand of the multianewarray instruction. In that case, only the first dimensions of the dimensions of the array are created.
Contents | Prev | Next | Index
Java Virtual Machine Specification (HTML generated by dkramer on February 25, 1997)
Copyright © 1996 Sun Microsystems, Inc.
All rights reserved
Please send any comments or corrections to doug.kramer@sun.com