title: How do exit two nested loops?
body: <p>I have been using Java for quite some time, yet my education in loops is somewhat lacking. I know how to create every loop that exists in java and break out of the loops as well. However, I've recently thought about this:</p>
  
  <blockquote>
    <p>Say I have two nested loops. Could I break out of both loops using just one <code>break</code> statement?</p>
  </blockquote>
  
  <p>Here is what I have so far.</p>
  
  <pre><code>int points = 0;
  int goal = 100;
  while (goal &lt;= 100) {
      for (int i = 0; i &lt; goal; i++) {
          if (points &gt; 50) {
             break; // For loop ends, but the while loop does not
          }
          // I know I could put a 'break' statement here and end
          // the while loop, but I want to do it using just
          // one 'break' statement.
          points += i;
      }
  }
  </code></pre>
  
  <p>Is there a way to achieve this?</p>