reading two dimensional array
Hi all!!
im new to this so please have mercy!!
ok so i have a two dimensional array, that looks like this:
A B C D
1 0 0 0 0
2 0 0 0 0
3 etc
4 etc
5
6
i need to get the value of a specific 'cell'
here is what i have in my method so far:
Code:
for (i = 0; i < 24; i++) {
seats[i] = new Seat();
int row = 1;
String col = "";
if(i%4 == 1){
col = "A";
}
else if(i%4 == 2){
col = "B";
}
else if(i%4 == 3){
col = "C";
}
else if(i%4 == 0){
col = "D";
}
seats[i].seatNo = row+col;
row++;
}
}
when i call it, i get the column fine, however im struggling to get the row value, i should mention i need the value to be 1A, 2C, 3D etc not 0!!
any help please guys i'd really appreciate it!!