Text Files for Java
Declaring the Reader and Writer:Scanner in = new Scanner(new File("(In File Location"));PrintWriter out = new PrintWriter(new FileWriter("(Out File Location)"));
Reading from text file:String Li = in.nextLine(); (This will read in the next line in the text file to the String Li)
Writing to text file:out.println(String);
Be sure to always close the text files!