Introducing Radical.sh

Forget Code launches a powerful code generator for building API's

Continue Statement With Label in Java

  1. public class ContinueWithLabel {
  2. public static void main(String[] args) {
  3. int intArray[][] = new int[][]{{1,2},{2,3}};
  4. Outer:
  5. for(int i=0; i < intArray.length; i++)
  6. {
  7. for(int j=0; j < intArray[i].length ; j++)
  8. {
  9. if(intArray[i][j] == 3)
  10. continue Outer;
  11. System.out.println("Element is : " + intArray[i][j]);
  12. }
  13. }
  14. }
  15. }