public static Object[][] readTextFile()
throws FileNotFoundException, IOException
{
try
{
BufferedReader in = new BufferedReader(
new FileReader("C:/Documents and Settings/seng/Desktop/testfile/assignment_matrix.txt"));
List list = new ArrayList();
String text;
while((text = in.readLine()) != null)
{
Object[] out = text.split(" "); // Separated by "whitespace"
for (int index = 0; index< out.length; index++)
out[index] = Integer.parseInt((String)out[index]); //problem here
list.add(out);
}
Object[][] output = (Object[][])list.toArray(new Object[0][0]);
return output;
}
catch ( IOException exc )
{
exc.printStackTrace();
}
return new Object[0][0];
}