GeezerVisonThe World Wide Web, restored to 800 pixels of glory. |
| Home|About|Gaming cabinet|Archives|How it works|Starter sites |
GeezerVison is showing github.com — JavaRock/src/main/java/com/test/basic/chapter3/SkipDemo.java at master · wyx-98/JavaRock Expand file tree/ Copy pathSkipDemo.javaMore file actions 34 lines (30 loc) · 793 Bytes / Copy pathSkipDemo.javaFile metadata and controls34 lines (30 loc) · 793 Bytes 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 package com.test.basic.chapter3; /** * Created by beigui on 2016/3/7. * 功能:break/continue/return 跳转语句 */ public class SkipDemo { public static void main(String[] args) { int a = 1; while (true) { a++; //break //当a大于3的时候,跳出循环 if (a > 3) { break; } } System.out.println(a); a = 1; while (a < 10) { a++; //当a的值能被2整除,表示该数不是奇数 if (a % 2 == 0) { continue; //跳过下面的语句,进入下一次循环 } System.out.print(a + " "); } return; // System.out.println("sss"); } } |
| You are visitor 01402792 — GeezerVison does not store the pages you look up. Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required. |