I'm trying to take a text file with 20x15 numbers(or characters, doesn't matter) into a 2d array. I just can't seem to get it to work. Can you help me fix it? Thanks
FileInputStream fis = new FileInputStream("MapFile.txt");
while (fis.available() > 0) {
for (int x = 0; x < MAP_X; x++) {
for (int y = 0; y < MAP_Y; y++) {
map[x][y] = (char) fis.read();
System.out.println(map[x][y]);
}
}
}