==== 7.5.8 arraylength ==== Get length of array Format arraylength Forms arraylength = 146 (0x92) Stack ..., arrayref -> ..., length Description The arrayref must be of type reference and must refer to an array. It is popped from the operand stack. The length of the array it references is determined. That length is pushed onto the top of the operand stack as a short. Runtime Exception If arrayref is null, the arraylength instruction throws a NullPointerException. Notes In some circumstances, the arraylength instruction may throw a SecurityException if the current context ([[3.4_Contexts| Section 3.4, Contexts]]) is not the owning context ([[3.4_Contexts| Section 3.4, Contexts]]) of the array referenced by arrayref. The exact circumstances when the exception will be thrown are specified in Chapter 6 of the **//Runtime Environment Specification, Java Card Platform, Version 2.2.2//**.