I have a program that writes data to a file as part of its functionality, however the way it is programmed means it can only write one String and i wish for it to be able to write more than this; a sentence for example. I would like to know how i can achieve this, any help guys?

Firstly (as the code is at the moment), in the main method, the user is asked if they would like to write data to the file (the path to which in this particular case is stored in the "path" parameter) and if the answer is equal to "yes" then the data is written by the code in the relevant section of the If statement that can be seen in the code below:
Code:
	    System.out.println("\nWould you like to write data to the file? (yes\\no)\n");
	  
	    answer1 = in.next();
	  
	    answer[0] = "yes";
	    answer[1] = "no";
	    
	    if(answer1.equalsIgnoreCase(answer[0]))
	    {	  
	        System.out.println("\nEnter data to write to ADS:\n");
	        answer2 = in.next();
	        writeToADS.write(path, answer2);	 
	    }	
	    else if(answer1.equalsIgnoreCase(answer[1]))
	    {
	    	System.out.println("\nNo data was written to the ADS\n");
	    }
The code that does the writing is in a class called writeToFile and can be seen below:

Code:
import java.io.*; 

public class writeToFile
{
	public static void write(String path, String answer3)
	{
	    try
        {
		FileOutputStream out = new FileOutputStream(path); 
		                                                  
		out.write(answer3.getBytes());
		out.close();                                        
		    
		System.out.println("\nData was written to file\n");
		    
		}
	    catch(Exception e)
	    {
	    	System.out.println("Exception has been thrown :" + e); 
	    }
	}
}
So how can this be modified to write a few Strings to the file and not just one? example code would be brilliant, as i haven't much time to get this modification done.

Thanks for any ideas and help guys