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
- 반복문
- BufferedWriter
- flutter
- Android
- CLASS
- 프로그래머스
- 다트
- BufferedReader
- Scanner
- string
- for문
- error
- dart
- array
- 백준
- 코딩테스트
- App
- For
- IF
- dataclass
- Kotlin
- 코틀린
- 별찍기
- androidstudio
- 앱개발
- android studio
- Java
- 안드로이드
- Return
- While
Archives
- Today
- Total
amid.jungs
🧐 코틀린 기본 04 본문
I. arraylist를 이용한 반복문
✔️for문
- 1..10 : 1에서 10까지 반복문 실행
- step2 : 2씩 건너뛰면서 반복문 실행 (ex. 1,3,5,7,9)
- until 100 : 99까지 100을 포함하지 않음
✔️while문
- 0~9까지를 출력
- index++이 없다면 0이 무한대로 출력됨
☑️실행 결과 :
a
b
c
d
1번째 학생 : a
2번째 학생 : b
3번째 학생 : c
4번째 학생 : d
55
current index : 0
current index : 1
current index : 2
current index : 3
current index : 4
current index : 5
current index : 6
current index : 7
current index : 8
current index : 9
'Kotlin 문법' 카테고리의 다른 글
🧐 코틀린 기본 06 (0) | 2021.02.19 |
---|---|
🧐 코틀린 기본 05 (0) | 2021.02.19 |
🧐 코틀린 기본 03 (0) | 2021.02.18 |
🧐코틀린 기본 02 (0) | 2021.02.18 |
🧐 코틀린 기본 01 (0) | 2021.02.17 |
Comments