Hi guys and girls. I’m stuck on something and I’m hoping one of you can at least point me in the right direction. I’ve created side-by-side 2d arrays to form 2 grids, but I need to print letters to the left of each grid to establish coordinates. I’ve been working on this all day and I can’t seem to figure out how to do it without printing across the entire array. Can someone show me (or give me a solid idea) where I should be plugging in the char increment for the row marker? I’m stumped.
for (int i = 0; i < grid1.length; i++)
{
for (int j = 0; j < grid1.length; j++)
{
grid1[i][j] = ' ';
System.out.print("|_"+grid1[i][j]+ "_");
}
System.out.print(" ");
for (int j = 0; j < grid1.length; j++)
{
grid2[i][j] = ' ';
System.out.print("|_"+grid2[i][j]+"_");
}
System.out.println("\n");
}
//char increment for row marker
char coord1 = 'A';
coord1++