Java??????????????
???????????? ???????[ 2014/11/19 14:30:36 ] ????????Java,???,???
??????java???棬?????????goto???????????????????????????????????????c/c++???????????ó????????????У???break??????????????????????????????????????????????????
????????????????????
?????????????????忪???????????λ????????????????????????????break????????????????
public class BreaklFor {
public static void main(String args[]){
OK: //?????????? ?????????break????????????????
for(int i=1;i<100;i++){ //??i???99??
for(int j=1;j<=i;j++){
if(i==10){
break OK ;
}
System.out.print(i + "*" + j + "=" + i*j) ;
System.out.print(" ") ;
}
System.out.println() ;
}
}
}
???????н???????????????????i=10????????????
???????????????????????????????????boolean?????λ????for?????????ж??????????????????
public class BreaklFor {
public static void main(String args[]) {
int array[][] = { { 5?? 7?? 6?? 4?? 9 }?? { 1?? 2?? 8?? 3?? 2 } };
boolean flag = false;
for (int i = 0; i < array.length && !flag; i++) { //??flag?true????????
for (int j = 0; j < array[i].length; j++) {
if (array[i][j] == 8) {
flag = true;
break;
}
}
}
System.out.println(flag);
}
}
?????????????λ?????????????????????????????
??????
???·???
??????????????????
2023/3/23 14:23:39???д?ò??????????
2023/3/22 16:17:39????????????????????Щ??
2022/6/14 16:14:27??????????????????????????
2021/10/18 15:37:44???????????????
2021/9/17 15:19:29???·???????·
2021/9/14 15:42:25?????????????
2021/5/28 17:25:47??????APP??????????
2021/5/8 17:01:11