title: How to add option to exit from switch case in Java
body: <p>I am creating a menu based program in java using switch case.
  here are 4 cases:</p>
  
  <blockquote>
    <ol>
    <li>add record</li>
    <li>delete record</li>
    <li>update record</li>
    <li>Exit</li>
    </ol>
  </blockquote>
  
  <p>I added break after each case but, what I want to do is to terminate the program when user enter case no 4 so what to do in this case ?</p>