0

For example, I have many 3x3 arrays that I would like to store together in a single array. is this possible? if so, how would I got about doing it?

1
  • 1
    Yes, it's another dimension in the array. Multiple instances of a n-dimensional array stored together are a n+1-dimensional array. Commented May 4, 2016 at 18:40

1 Answer 1

1

Simply:

int size = // ...
int[][][] array3d = new int[size][][];

// let's now store the arrays:
arrays3d[0] = some2darray;
// ...
Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.