how do i do:
char[][][] map = new char[y][z][x];
but define the size with:
int[] size = new {y,z,x};
I tried looking it up but i couldn't find anything helpful.
how do i do:
char[][][] map = new char[y][z][x];
but define the size with:
int[] size = new {y,z,x};
I tried looking it up but i couldn't find anything helpful.
If I understand the question correctly, you're looking to initialize the array with a set of values.
As opposed to initializing an array with a fixed length, and then adding the values one at a time.
Your code is correct, just remove the new
keyword.
int[] size = { y, z, x };