Notice
Recent Posts
Recent Comments
Link
일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
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 |
Tags
- might have p.p
- gameQA
- continue to
- by until
- relif
- 게임QA
- 제5인격
- html
- 명세기반테스트
- sort함수
- metascore
- ISTQB
- java
- Realtime Rendering
- keep -ing
- end up ing
- I'm glad
- know
- by any chance
- happen to
- 변수
- C++
- 명절 표현
- 코로나19
- for ing
- counldn't have
- UE4
- it's a good thing
- if조건절
- 형변환
Archives
- Today
- Total
Records rather than Memories
[java] while 반복문 본문
While 반복문
while(조건){ <-- 조건이 true인 동안 반복
반복 실행 영역
}
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
|
package javatutorials.loop;
public class Whileloop {
public static void main(String[] args) {
// TODO Auto-generated method stub
int i = 0;
// i값이 10보다 작으면 true, 크다면 false
while (i < 10) {
System.out.println("Let's go!!" + i);
// i값에 1을 더한다. 반복문의 중괄호 마지막 라인데 도달하면 반복문 조건을 검사
i++;
}
}
}
|
cs |
다음 코드에서 i가 10보다 작은 경우에만 Let's go!! i가 출력된다.
'Software > JAVA' 카테고리의 다른 글
[java] break, continue (0) | 2019.10.15 |
---|---|
[java] for문 (0) | 2019.10.15 |
논리 연산자 (0) | 2019.10.15 |
GUIApp (0) | 2019.10.15 |
[java] switch문 (0) | 2019.10.14 |
Comments