CreateJavaArray
Mon 01 January 2018Syntax
CreateJavaArray(ElementClassName[], NumberOfElements)
Description
Use the CreateJavaArray function to create a Java array without knowing the number or value of the elements.
When you create an array in Java, you already know the number of elements in the array. If you do not know the number of elements in the array, but you want to use a Java array, use the CreateJavaArray function in PeopleCode. This creates a Java object that is a Java array, and you can pass in the number of elements that are to be in the array.
The first index in a Java array is 0. PeopleCode arrays start at 1.
Do the following to specify this type of array in Java:
new ElementClassName[NumberOfElements];
Parameters
Field or Control |
Definition |
---|---|
ElementClassName[] |
Specify the array class name. This parameter takes a string value. |
NumberOfElements |
Specify the number of elements in the array. This parameter takes a number value. |
Returns
A Java object