codeGK
Code it ALL
Break in Java - CodeGK

♦ Break in Java

♣ Example3: Break in Java

In this example, Break is done when "cherry" is encountered.
Example
Input:
Output:
For_loop