GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — JavaRock/src/main/java/com/test/basic/chapter3/SkipDemo.java at master · wyx-98/JavaRock

Expand file tree

/

SkipDemo.java

Copy path
More file actions
More file actions

Latest commit

 

History

History
History
34 lines (30 loc) · 793 Bytes
/

SkipDemo.java

Copy path

File metadata and controls

34 lines (30 loc) · 793 Bytes
Raw
Copy raw file
Download raw file
Open symbols panel
Edit and raw actions
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.