[QUOTE=firstPerson;1003276]Yes. In fact thats very common, using 1d array as a mimic of a 2d.
final int ROW = 5;
final int COL = 5
char Letters = new char[ ROW * COL];
for(int i = 0; i < ROW * COL; i++)
Letters[i] = (char)( 'A' + i );
for(int i = 0; i < ROW; i++)
for(int j = 0; j < COL; j++)
System.out.print( Letters[j + i * ROW] + " " );
It hasn't been tested, but you should get the idea, if it doesn't work.[/QUOTE]
In this there is restriction that the array dimension can't be prime (Not a big deal...HUH??) :yawn:
for prime we can use following looping...
I hope this works well and maybe better (LOL :D)
your signature is really good "firstPerson" :)