2

I'm trying to create a 3 dimensional array where each index contains a 2 dimensional array with different sizes. So basically it's an array of 2d arrays. I have these arrays:

boolean [][] alpha = new boolean [5][3];
boolean [][] beta = new boolean [10][5];
boolean [][][] all = new boolean [5][][];

I tried this but obviously it was wrong :

all [0][][] = alpha;
all [1][][] = beta;

How can this be done?

1 Answer 1

1

It should be

all [0] = alpha;
all [1] = beta;
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.