Haiii everyone.. i really need help about this code.. please someone help me..
public class Ant { private int Row = 0; private int Column = 0; private String [] [] ArrayAnt; public Ant(int r, int c) { Row = r; Column = c; ArrayAnt = new String[Row] [Column]; Grid(); } private void Grid() { for(int r = 0; r < Row; r++) { for(int c = 0; c < Column; c++) { ArrayAnt[r][c] = "W"; } } } } public class ProgramAnt1 { public static void main(String[] args) { Ant ant = new Ant(3,3); System.out.println(ant); } }
that code cannot print the array.. please help me to solve it.. thanks..