Contents | Prev | Next | Index

multianewarray

Operation
Create new multidimensional array

multianewarray
indexbyte1
indexbyte2
dimensions

Forms
multianewarray = 197 (0xc5)

Stack
..., count1, [count2, ...] ..., arrayref

Description
The dimensions is an unsigned byte which must be greater than or equal to 1. It represents the number of dimensions of the array to be created. The operand stack must contain dimensions words, which must be of type int and nonnegative, each representing the number of components in a dimension of the array to be created. The count1 is the desired length in the first dimension, count2 in the second, etc.

All of the count values are popped off the operand stack. The unsigned indexbyte1 and indexbyte2 are used to construct an index into the constant pool of the current class (§3.6), where the value of the index is (indexbyte1 << 8) | indexbyte2. The item at that index in the constant pool must be a CONSTANT_Class (§4.4.1). The symbolic reference is resolved (§5.1.3). The resulting entry must be an array class type of dimensionality greater than or equal to dimensions.


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