My program writes entries of text to a file. Each entry is 4 word tokens written on a line. I want each entry to go on its own line, but the output I'm getting so far is:
abc1 abc1 abc1 abc1 abc2 abc2 abc2 abc2 abc3 abc3 abc3 abc3
(i.e. everything on the same line)
Here's my code:
//targetFile = "C://...."
BufferedWriter writer = new BufferedWriter(new FileWriter("targetFile, true));
String s;
s = userInfo1; //userInfo is an array of 4 word tokens
writer.append(s + " ");
writer.flush();