That's not quite. Obviously you have some fundemental misunderstandings aboutthe language that you might want to clear up. You may want to look
here for a good tutorial on the language. More specifically you can find information about arrays in java
here. However, you may want to go over variables (which is a section or two before arrays), as you may not have gotten a concrete understanding of how they work yet.
As for how you could do the program, you have to understand that you just can't turn a file into an array. What you want to do is read data from a file, then put it into an array. You may want to look into something like ArrayList, as I feel that you may not be sure how many entries are going to be in the file. Arrays have to be a specified size. If you use an ArrayList you will not have to worry about resizing the array.
So to recap, you want to read data from a file (one entry at a time), then put it into an array). How you read it from the file depends on how the file is formated. Generally you will be reading just ascii text. In which case you can easily use the
Scanner class to parese through your data. In order to create a scanner which reads from the file you can do something along the lines of.
Code:
try {
Scanner reader = new Scanner( new File("file.dat") );
catch(FileNotFoundException e) {
System.out.println("File was not found");
}
See if you can't come up with something after looking over this new information. Then post back if you have any problems.
cs_student