how can I print new line in a file using a reference to Formatter object
what should I print in output.format() to promote the file to inter new line before printing the next line that it reads from input
Code:
//create reference to file to read from Scanner input=new Scanner(new File("d:\\records1.txt")); //create reference to file to write Formatter output=new Formatter("d:\\records7.txt"); while(input.hasNext()){ output.format(input.nextLine()); output.format(); }
Comment