how can i Re Order a 2D array?

this is what i want to happen, i want to move S.Clancy ahead of G. Buckner.

(this is what i currently looks like)

G. Buckner G 6-4 210 76 3 76 70 79

S. Clancy F 6-7 240 80 R 65 69 66

I have these values in a txt file that is read into a 2D array.

Now what i want to do is be able to swap there positions. Right now i have my code setup like this:

System.out.println("Reoderder Rosters");

reOrder = new String[20][]; //Shows team Roster

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

reOrder[j] = new String[10];

for (int k=0; k < 10; k++) {

reOrder[j][k] = In.readLine();

System.out.print(reOrder[j][k] + "\t");

i++;

}

}

System.out.print("Please Select Player to Move (1-X): ");

firstPlayer = keyboard.readLine();

index = Integer.parseInt(firstPlayer);

System.out.print("Please Select the Player you which to swap with (1-X: ");

secondPlayer = keyboard.readLine();

index2 = Integer.parseInt(secondPlayer);

for (int m=0; m<9;m++) {

tempPlayer [0][m] =reOrder [index][m];

reOrder [index][m] = reOrder [index2][m];

reOrder [index2][m] = reOrder [0][m];

}

So my question is, can i keep going this way? right now im getting a null error when i try to display the team, THEN when i try to make a swap between the 2 players i see i get this error

"java.lang.ArrayIndexOutOFBOundsException at Game.main<Compiled Code>"

Can someone please help me

[1519 byte] By [Sanjana] at [2007-9-28 8:25:21]
# 1
> for (int m=0; m<9;m++)that should probably be m<10 btw.You have to find the line where the arrayindexoutofbounds happens and fix it.
Kayamana at 2007-7-9 20:15:59 > top of Java-index,Other Topics,Java Game Development...