title: trouble with do while loop.. want to have while ==yes.option OR until index<MAX but it keeps looping
body: <p>The below code just keeps looping even if the user selects the "no" option.</p>
  
  <pre><code>do{             
      addStudent();
      student.calcTuition(numCredits, fee);
      printStudent(); 
  } while(JOptionPane.showConfirmDialog(null,"Another Student?") != JOptionPane.YES_OPTION
          || studentNum &lt; 20);
  </code></pre>
  
  <p>I want to have this loop end if the user either doesn't have another student to enter or if the student count is above 20 so is my <code>studnetNum&lt;20</code> syntax wrong? Because if I delete that, it obviously ends the loop after the user clicks no, but how do I have both?</p>