How do i read a txt file into a char array. what i have so far only give me blank lines
String fname = "c:\\game.txt";
char data;
int row = 2;
int col = 4;
char[] matrix = new char[row];
private void openFile()
{
try
{
FileReader reader = new FileReader(this.fname);
for (int i=0; i<matrix.length; i++)
{
reader.read();
}
reader.close();
}
catch(Exception e)
{
String s = e.toString();
System.out.println(s);
}
}