I'm new and trying to draw a table type where I can place scores inside like 5;
A B C
1 5//this is where it all falls apart
2
3
I have this so far but not working;
public class Table3 {
static int[][] list = new int[4][4];
//private char column = 'A';
//private int row = 1;
private static int row = 1;
public Table3(){
//column = 'A';
for (int i = 0; i < 4; i++) {
for (int j = 1; j < 4; j++)
list[i][j] = 0;
}
}
public static void table(char col, int row, int value) {
System.out.printf("\n\n%s\n", "Table");
for (int i = 1; i < 4; i++) {//System.out.print(row2 + " ");
for (int j = 1; j < 4; j++)//System.out.print(column + " ");System.out.println("\n");row2++;column++;
if (row >= 0 && row <= 4 && col >=0 && col <= 4)
System.out.print(list[col][row]=value);
System.out.println("\n");
}
}
}
Client;
public class TableTest {
public static void main(String[] args) {
// TODO Auto-generated method stub
Table3 t = new Table3();
Table3.table('A', 5, 5);
}
}
Any help would be appreciated.