I want every line in my textdoc to be assigned to a variable.
import java.io.*;
import static java.lang.System.*;
class readfile {
public static void main(String[] args) {
try {
FileReader fr = new FileReader("filename");
BufferedReader br = new Buffered(fr);
String str;
while ((str = br.readLine()) != null) {}
br.close();
} catch (IOException e) {
out.println("file not found");
}
}
}