So I have this code... and this is what a section of it looks like.
File File = new File("data2.txt");
Scanner readUpdate = new Scanner(File);
Player[] updatePlayers = new Player[200];
String updateSTR;
int updateTotalCounter = 0;
while (readUpdate.hasNext()) {
updateSTR = readUpdate.nextLine();
String [] updateData = updateSTR.split(",");
updatePlayers[updateTotalCounter] = new Player(updateData[0], updateData[1],updateData[2],
Integer.parseInt(updateData[3]), Integer.parseInt(updateData[4]));
updateTotalCounter++;
}
readUpdate.close();
Java keeps coming up and telling me that
Exception in thread "main" java.lang.ArrayIndexOutOfBoundsException: 4
at Main.main(Main.java:43)
I don't understand what this means. Any clues??