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
- metascore
- UE4
- 게임QA
- keep -ing
- ISTQB
- sort함수
- 변수
- java
- gameQA
- 코로나19
- continue to
- 명세기반테스트
- html
- happen to
- end up ing
- might have p.p
- I'm glad
- by any chance
- Realtime Rendering
- relif
- 제5인격
- by until
- know
- if조건절
- 형변환
- for ing
- C++
- it's a good thing
- counldn't have
- 명절 표현
Archives
- Today
- Total
Records rather than Memories
반복문의 중첩 본문
반복문은 중첩이 가능하다.
다시 말해 for문 안에 for문을 넣는 방식이다.
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
|
package javatutorials.loop;
public class LoopDepthDemo {
public static void main(String[] args) {
// TODO Auto-generated method stub
for(int i = 0; i < 10; i++) {
for (int j = 0; j < 10; j++) {
System.out.println(i + "" + j);
}
}
}
}
|
cs |
i의 for문이 먼저 들어간다 이때 i의 값은 0으로 시작하고 그 안에서
j의 for문이 돌아가기 때문에 00, 01 ... 98, 99로 이어진다.
'Software > JAVA' 카테고리의 다른 글
Method (0) | 2019.10.16 |
---|---|
배열 (0) | 2019.10.16 |
[java] break, continue (0) | 2019.10.15 |
[java] for문 (0) | 2019.10.15 |
[java] while 반복문 (0) | 2019.10.15 |
Comments