title: how to break an enhanced for loop from a switch in java
body: <p>I found this interesting thing you can break a enhance for loop with a break; statment but i want to know if it is possible to break a enhanced For loop from a switch statement inside that statement </p>
  
  <p>For Example</p>
  
  <pre><code>String test = "(2.0+4.0)";
  
      for (char now : test.toCharArray()){
  
          switch (now) {
  
          case '(':
              // i want the loop to stop from this point
              break;
          case ')':
          case '/':
          case '*':
          case '+':
          case '-':
          }
      }
  </code></pre>
  
  <blockquote>
    <p>Edited </p>
  </blockquote>
  
  <p>Found the answer 
  labeled break.
  but im going Old school </p>
  
  <pre><code>String test = "(2.0+4.0)";
      boolean found = false;
      for (char now : test.toCharArray()){
  
          switch (now) {
  
          case '(':
              // i want the loop to stop from this point
              System.out.println(now);
              found = true;
              continue;
          case ')':
          case '/':
          case '*':
          case '+':
          case '-':
          }
  
          System.out.println("im out of switch");
          if(found)break;
      }
      System.out.println("out of Loop");
  
  }
  </code></pre>
  
  <p>That Did it</p>
  
  <p>Thanks For All the Answers</p>