Java array list's (Saving to a file)

I have some code that writes my array list to a file in this format.

[bob, jill]

However i need it to be saved in this format.

bob
jill

My current code is

public void saveCusNa() throws FileNotFoundException {
//for testing##########
name.add("bob");
name.add("jill")
//##################
String tmp = name.toString();
PrintWriter pw = new PrintWriter(new FileOutputStream("nameCus"));
pw.write(tmp);
pw.close();
}

Any suggestions as I can't set up any sort of loop that works for me.

you need to add a loop that will go through the array and print your array item then a new line

or

hope this helps, im not really sure myself

This might help you with formatting your lines as well: String.format in java

Though it looks like @anarekist 's link does everything you need it to.