Java Using the Scanner to write user input to a .txt file
<p>So I am supposed to write a program that reads strings from the user and writes them to an output file, and stop processing when the user inputs "DONE." This is all I have and I'm totally stuck. Any help would be very appreciated!</p>

<pre><code>import java.util.Scanner;
import java.io.*;

public class Parrish_A04Q3 
{
    public static void main(String [] args) throws IOException
    {
        String file = "userStrings.txt";

        Scanner scan = new Scanner(System.in);

        FileWriter fw = new FileWriter(file);
        BufferedWriter bw = new BufferedWriter(fw);
        PrintWriter outFile = new PrintWriter(bw);
    }
}
</code></pre>