Contents Prev Next Up

## - An Optimization

# Managing Arrays (_quick variants)

anewarray_quick

### anewarray_quick

Allocate new array
of objects

    ..., size => result

size should be an integer. It represents the number of elements in the new array.

indexbyte1 and indexbyte2 are are used to construct an index into the constant pool of the current class. The entry should be a class.

A new array of the indicated class type and capable of holding size elements is allocated. Allocation of an array large enough to contain nelem items of the given class type is attempted. All elements of the array are initialized to zero.

If size is less than zero, a NegativeArraySizeException is thrown. If there is not enough memory to allocate the array, an OutOfMemoryException is thrown.

Contents Prev Next Up

Generated with CERN WebMaker