More Trouble with 'do while' loops, Java
<p>How do I get my program to prompt the user for different choices until they decide to purposefully exit the program? Right now I tried a do-while loop with a boolean called 'exit,' trying to say that while exit is false keep prompting the user to choose what to do, though all it does is ask them once and after it has done what the user wanted, the application stops.</p>

<p>Here is my code:</p>

<pre><code>boolean exit = false;

do {
  int options = 0;
  do {
    options = Integer.parseInt(JOptionPane.showInputDialog(null,
              "Would you like to:"
              + "\n(Enter number value of option you would like to choose.)\n"
              + "\n1. See your recommendations. \n2. See top rated books."
              + "\n3. See random books of the day. \n4. Exit"));
  } while (logIn &lt; 1 || logIn &gt; 4);

  if (options == 1) {
    recommend.displayRecommendations(custIndex);
  } else if (options == 2) {
    calculations.displayTopTen();
  } else if (options == 3) {
    calculations.displayRandomBooks();
  } else if (options == 4) {
    exit = true;
    System.exit(0);
  }
} while (exit = false);
</code></pre>

<p>Any help would be appreciated.</p>
