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 |
Tags
- JS
- React
- 리액트
- Java
- Javscript
- 코틀린
- 랜덤넘버
- JavaScript
- 스프링부트
- npm
- Hook
- RecyclerView
- Android
- array
- nodejs
- TypeScript
- Kotlin
- button
- 자바스크립트
- fragment
- TextView
- stylesheet
- 오버라이딩
- GoogleMaps
- scrollview
- Linux
- 구글맵스
- 안드로이드
- SpringBoot
- 랜덤번호
Archives
- Today
- Total
목록가변형리스트 (1)
타닥타닥 개발자의 일상
Kotlin에서 list, array, MutableList 사용하는 예시 / 리스트 생성하기 / lisfOfNotNull 만들기 / index찾기 / 일반 리스트 가변형 리스트로 변환 / list->array 전환 / array->list 전환
fun main(args: Array) { //collection 수집 ArrayList LinkedList HashMap TreeMap //추가, 삭제 불가 var numbers: List = listOf(1,2,3,4,5) for(n in numbers) print("$n") //출력값: 12345 println() var names:List = listOf("one","two","three") for(name in names){ println(name) } /* 출력값 one two three */ println(names.size) //출력값: 3 println(names.get(1)) //출력값: two println(names.indexOf("three")) //출력값:2 println(nam..
코딩 기록/Kotlin
2022. 1. 27. 00:01