?? testdowhile.java
字號:
/**
* Description:
* <br/>Copyright (C), 2005-2008, Yeeku.H.Lee
* <br/>This program is protected by copyright laws.
* <br/>Program Name:
* <br/>Date:
* @author Yeeku.H.Lee kongyeeku@163.com
* @version 1.0
*/
public class TestDoWhile
{
public static void main(String[] args)
{
//定義變量count
int count = 1;
//執行do while循環
do
{
System.out.println(count);
// 循環迭代語句
count++;
}
//循環條件緊跟while關鍵字
while (count < 10);
System.out.println("循環結束!");
//定義變量count2
int count2 = 20;
//執行do while循環
do
//這行代碼把循環體和迭代部分合并成了一行代碼
System.out.println(count2++);
while (count2 < 10);
System.out.println("循環結束!");
}
}
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -