提示:您可在线编辑运行本教程的实例 - 运行实例,去试试!
带标签的中断声明
/** 来自 N o w J a v a . c o m - 时代Java**/ public class Main { public static void main(String[] args) { int[][] intArray = new int[][]{{1,2,3,4,5},{10,20,30,40,50}}; boolean blnFound = false; System.out.println("Searching 30 in two dimensional int array.."); Outer: for(int intOuter=0; intOuter < intArray.length ; intOuter++){/* 来 自 时代Java公众号 - N o w J a v a . c o m*/ Inner: for(int intInner=0; intInner < intArray[intOuter].length; intInner++){ if(intArray[intOuter][intInner] == 30){ blnFound = true; break Outer; } } } if(blnFound == true)