Hi,
Can someone tell me how to generate general "n dimensional arrays"?. (i.e) I am given the number of dimensions and the length along each dimension as arguments to a function , I need to generate such an array in that function. All I can tell about the number of dimensions before hand is it will be less than 20. (Assume the lengtth along dimensions are such that the number of elements don't go beyond memory).

I am studying for my Programming 1 final and I am having a little trouble with this problem on my study guide. Any assistance would be greatly appreciated. The problem is as follows.

Show how to declare a 2 dimensional array of integer values. This array should have 5 rows and 300 columns. Next, show the code necessary to fill this array with random values ranging from 0 up to 99 (including both 0 and 99). Finally, show the code necessary to sum up the values in each column and display the sum of each on the screen.

MATLAB scans column-wise the input matrix and writes them column-wise into the new matrix of specified matrix. Now i need to do that in Java, not a generic reshape, but for some specific cases. One of them is to transform a 1D array a[50400] into this 7D array c[2][12][4][5][5][7][3]. please, suggest how to do this.

Multi-dimensional arrays are powerful constructs in Java. However, most of the times its better to an VO class, and store these objects in a List or a Map. This approach is more object oriented, and much easier to implement and understand.