Creating a dynamic 3d array in Java

I have a piece of information that depends on 3 different factors (which I represent as numbers), for example,

if 0,0,0 then information is (value)

if 0,0,1, then information is (value)


I initially created a 3d array, and filled it with nested for loops, something like

for (int i = 0; i < maxfactor1; i++) {

for (int a = 0; a < maxfactor2; a++) {

for (int j = 0; j < maxfactor3; j++) {

test2[i][a][j] = j * 2.0;





The problem is that I may not have every single combination of factors, and including them...

Read More »

By: StackOverFlow - Friday, 9 November

Related Posts