user3204065
user3204065

Reputation: 51

Java multidimensional array

I have a number of two dimensional arrays of different sizes, such as:

size of A1:  10 * 8
size of A2:  10 * 10
size of A3:  10 * 12

Is there any way I can put them into one structure to get a three dimensional object?

Upvotes: 0

Views: 67

Answers (1)

talex
talex

Reputation: 20541

Yes.

YourType[][][] array3d = new YourType[3][][];
array3d[0] = A1;
array3d[1] = A1;
array3d[2] = A1;

Upvotes: 1

Related Questions