Java - Is there a way to call a variable using a variable as part of its name?
<p>This is what I'm doing,</p>

<pre><code>for (i=0; i&lt;4; i++){
    for (j=0; j&lt;7; j++){
        someArray[1][i][j] = value1[i][j];
    }
}
for (i=0; i&lt;4; i++){
    for (j=0; j=0; j&lt;7; j++){
        someArray[2][i][j] = value2[i][j];
    }
}
</code></pre>

<p>This is what I'd like to do</p>

<pre><code>for (j=0; j&lt;14; j++){
    for (i=0; i&lt;4; i++){
        for (j=0; j=0; j&lt;7; j++){
            someArray[j][i][j] = value%j%;
        }
    }
}
</code></pre>

<p>Is there a way to do something like this? </p>

<p>The reason I am doing this is because I need to set the value of an array and I don't know how to declare values for multidimensional string arrays.</p>

<p>I know how to do this</p>

<pre><code>public static String value1[] = {
    "somevalue",
    "morevalue",
    "blahvalue"
};
</code></pre>

<p>but I don't know how to do that if I'm declaring...</p>

<pre><code>public static String value[][] = ...
</code></pre>
