java-array-type.create
Creates a new Java array of the given type.
Syntax
java-array-type.create( size INTEGER )
RETURNS java-array-type
- size defines the actual number of elements of the array.
- java-array-type is a user type defined with the
TYPE
instruction.
Usage
This class method creates a new instance of the Java array specified by the type used, with the size provided as parameter.
The type must be declared as a user defined type define with the ARRAY [ ]
OF
notation reserved for Java arrays.
Example
IMPORT JAVA java.lang.String
MAIN
TYPE string_array_type ARRAY[] OF java.lang.String
DEFINE names string_array_type
LET names = string_array_type.create(100)
LET names[1] = "aaaaaaa"
DISPLAY names[1]
END MAIN