I have 2D array called grid which in column [0] has string in the format 01/03/2003, I don't want to deal with date formats as im only concentrated on the year, therefore i use substring and compare it to the year in question (as seen below).
My question is, how come the if statement only seems to iterate once? It should iterate a fair few times as the first 30 dates are "2003".
if (grid[row][0].substring(6,10).equals("2003")) {
out03.write(grid[row][1] + "\n");
System.out.println(row + "\n");
row ++;
}
Thanks, Chris