User`s guide

4 Using MWArra y Classes
To construct a MWCharArray object w ith the specified dimensions, use
public static MWCharArray newInstance(int[] dims)
The elements of the array are all initialized to zero.
To construct a
MWCharArray object with the specified dimensions and
initialized with the supplied data, use
public static MWCharArray newInstance(int[] dims,
Object data)
Input Parameters
dims
Array of dimension sizes. Each dimens ion size must be nonnegative.
data
Data to initialize the array
Example Constructing a Character Array Object with newInstance
Create an MWCharArray object containing the text Hello:
int[] dims = {1, 5};
char[] chArray = {'H', 'e', 'l', 'l', 'o'};
String str = new String(chArray);
MWCharArray A =
MWCharArray.newInstance(dims, str);
System.out.println("The array string is \"" + A + "\"");
When run, the example displays this output:
The array string is "Hello"
dispose. MWCharArray inherits this method from the MWArray class.
4-110