12.

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


Java Virtual Machine
Java Virtual Machine (Java Series)
ISBN: 1565921941
EAN: 2147483647
Year: 1996
Pages: 171

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net