easy question about while loop
I'm writing my first program eve. I'm using a while loop with three more while within.
In the first while statement the following code. The code asks for a name, address & email; however, I don't how to make it stop& return to the main loop when I enter the data.
thanks in advance
Code:
while (true)
{
while (option1 ==1)
{
cname = JOptionPane.showInputDialog(null, "What is the customer's name?");
PrintWriter outputFile = new PrintWriter("customerInfo.txt");
outputFile.println(cname);
caddress = JOptionPane.showInputDialog(null, "What is the custormer's address?");
outputFile.println(caddress);
cemail = JOptionPane.showInputDialog(null, "What is the customer's e-mail address?");
outputFile.println(cemail);
outputFile.close();
break;
}