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)

etc.

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;

System.out.println(test2[i][a][j]);

}

}

}

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

  • Older News
  • How To Solve Dynamic Array? StackOverFlow (Today) - How To Search and Store an Dynamic Array.if i have 50 records , i will search with a specific name, which will show me 15 records out of 50 records....