title: In the java programming, if the input validation fails, how can I allow user to retry three times before throwing an exception and terminating?
body: <p>In the java programming, if the input validation fails, how can I allow user to retry three times before throwing an exception and terminating?
  •</p>
  
  <pre><code>Sample Run
  Enter taxable income ... 80
  The taxable income must be at least $1200.0
  Enter taxable income ... 890
  The taxable income must be at least $1200.0
  Enter taxable income ... 1090
  The taxable income must be at least $1200.0
  Exception in thread "main" java.lang.RuntimeException: Sorry
  you're having trouble
  </code></pre>