流程控制语句-------控制跳转语句break,continue,return,标号 各自使用及区别(3---7)

1.break的使用场景:只能在switch和循环中面试 class Demo1_Break { public static void main(String[] args) { for (int x = 1;x <= 10 ;x++ ) { //1 2 3 4 if (x == 4) { break; //跳出循环 } System.out.pr
相关文章
相关标签/搜索