I've seen many links to do the opposite of this but that is not what I want. I want to make an array and the contents of the array I want to equal the file, so they can be read one at a time in a loop but what I've shown below is what I have come up with at the moment, but have no idea how to get right.
File (lifeobjects[5]) = new File ("toad.lif");
EDIT: I want to read a file from an array not into one. The array just points to the file to be read. and I have a string array called lifeobjects which I want the files to be in.
EDIT: All this array does is list the files, after that a for loop will get each file one at a time, read them and the contents will go into another array. To make java realize that each element of the array is a file is where I am getting stuck. The one line of code I have is one of many after the String array which is where the list of file names are found.
EDIT: Ok I've managed to get it working, All I needed to do was change the array elements and add their file extensions to them and the code above wasn't needed at all, sorry if the question was too vague, had hard time explaining it. All I have to do now is convert this command line program to a GUI with a square grid, I'll ask that question next as I have tried and tried and got nowhere.