java循环1

public class f_w {
    
    public static void main(String []args) {
        int a=0;
        System.out.print("_info__while");
        while(a<10) {
            a+=1;
            if(a == 5) {
                continue;
            }

            System.out.print("\nindex of: " + a );
            
        
    }
        System.out.print("\n_info__do/while");
        do {
            System.out.print("\nindex of: "+a);
            a++;
            if(a==15) {
                break;
            }
        
        
    }while(a<20);
        for(int x=0,y=0;x<10 & y<20;x++,y++) {
            System.out.println("index of : "+x);
        }
        
            
}
        
}

 

posted @ 2019-04-24 16:16  竹心_兰君  阅读(208)  评论(0编辑  收藏  举报