Hi! I have a school project where I have to make a array that includes facts about films. Every space in the array includes leanght of the film, authour, grade, company, and title.
So I know how to write it to a file but I have no idea how to write it back in to the array.
Here is my code so far:
try{
FileReader fr = new FileReader ("filmer.txt");
BufferedReader inFil = new BufferedReader(fr);
String rad = inFil.readLine();
while (rad != null){
System.out.print(rad + "\n");
rad = inFil.readLine();
}
inFil.close();
}
catch(FileNotFoundException e1){
System.out.println("Filen hittas inte");
}
catch(IOException e2){
System.out.println(e2);
}