eyeoforion
05-13-2005, 05:08 AM
Ok, here's the rub. I have to write a 2D array to a file, the two components of the array have to be comma delimited/be seperated by a comma. I have some of the basics but I can't work out for the life of me how to actually get the array components into a file. Here's what I have so far
boolean newLine=writer.writeLine(); //new line in file
//create header
newLine=writer.writeLine(header);
//input array contents to file
for (int i=0;i<array.length;i++){
for (int j=0;j<array.length[i],j++{
newLine=writer.writeLine([i],[j])??????
I'm at a loss, if it wasn't for the comma delimiting I would be ok but that's got me stumped. I know what I've put in in the writer.writeLine is not correct but I can't think of any other way to do it!!
Thanks, Orion
boolean newLine=writer.writeLine(); //new line in file
//create header
newLine=writer.writeLine(header);
//input array contents to file
for (int i=0;i<array.length;i++){
for (int j=0;j<array.length[i],j++{
newLine=writer.writeLine([i],[j])??????
I'm at a loss, if it wasn't for the comma delimiting I would be ok but that's got me stumped. I know what I've put in in the writer.writeLine is not correct but I can't think of any other way to do it!!
Thanks, Orion