For example lets say i have the following String,
String str = "Patient: " + patient +
"\nMonth: " + month +
"\nDay : " + day +
"\nYear: " + year
+"\nDescription: " + description;
//And I write this data to a file,
PrintWriter outputFile = new PrintWriter("hello.txt");
outputFile.println(str);
Then the result on the file is just a single line, when I open it, is there a way, to just do the format as the String passed into the file.?
Thank you in advance.