Java Virtual Machine (Java Series)

prev next contents
arraylength

get length of array

Jasmin Syntax

arraylength

Stack

Before

After
arrayref length
... ...
Description

Removes arrayref (a reference to an array) from the stack and replaces it with the length of the array (an int). For multi-dimensional arrays, the length of the first dimension is returned.

Exceptions

NullPointerException - arrayref is null.

Bytecode

Type

Description
u1 arraylength opcode = 0xBE(190)


prev next contents
Java Virtual Machine, by Jon Meyer and Troy Downing, O'Reilly Associates

Категории