continue详细讲解
                                                            生活随笔
收集整理的這篇文章主要介紹了
                                continue详细讲解
小編覺得挺不錯的,現在分享給大家,幫大家做個參考.                        
                                package com.wuming.struct;
public class ContinueDemo01 {
 ? ? public static void main(String[] args) {
 ? ? ? ? //continue 跳過當前循環即當前循環內continue后面的輸出語句不執行,繼續下一次循環
 ? ? ? ? int i=0;
 ? ? ? ? while(i<100){
 ? ? ? ? ? ? i++;
 ? ? ? ? ? ? if (i%10==0){
 ? ? ? ? ? ? ? ? System.out.println();
 ? ? ? ? ? ? ? ? continue;
 ? ? ? ? ? ? }
 ? ? ? ? ? ? System.out.print(i);
 ? ? ? ? }
 ? ? }
 }
123456789
 111213141516171819
 212223242526272829
 313233343536373839
 414243444546474849
 515253545556575859
 616263646566676869
 717273747576777879
 818283848586878889
 919293949596979899
總結
以上是生活随笔為你收集整理的continue详细讲解的全部內容,希望文章能夠幫你解決所遇到的問題。
 
                            
                        - 上一篇: BugkuCTF-MISC题想蹭网先解开
- 下一篇: Python random 模块 - P
