I have an array that contains 3 arrays, like this:
String[][] S = { {a,b,c} , {d,e}, {f,g,h} }
Now I want to create all arrays
R = {r1,r2,r3}
where r1 belongs to S1, r2 belongs to S2, r3 belongs to S3 (S1, S2, S3 are sub-array of S) and I want have the output like that:
R1 = {S[1][1], S[2][1], S[3][1]},
R2 = {S[1][1], S[2][1], S[3][2]},
R3 = {S[1][1], S[2][1], S[3][3]},
...,
R18 = {S[1][3], S[2][2], S[3][3]}
I can not use 3 for-iterators because the array S is dynamic.