In the following code, I am iterating through an array list and writing each element out to a file. What should I add to the code to write each element of the array list to a new line in the file.
String word = null;
FileOutputStream fos = new FileOutputStream("password.txt", true);
PrintWriter pw = new PrintWriter(fos);
for (int i = 0; i < pswdAL.size(); i++)
word = (String)pswdAL.get(i);