break,continue,goto

break,continue,goto

public class breakDemo01 {
    public static void main(String[] args) {
        int a = 0;
        while(a<20){
            a++;
            if (a==10){
                System.out.println("");
                continue;
            }
            System.out.print(a+"\t");
        }
        System.out.println("===================");
        //打印质数
        int count = 0;
        outer:for (int f = 101;f<150;f++){
            for (int p = 2; p< f/2; p++){
                if (f%p == 0){
                    continue outer;
                }
            }
            System.out.print(f+" ");
        }

    }
}

break,continue,goto

上一篇:Swoole PHP windows composer


下一篇:Java基础系列(25)- break、continue、goto