Courses
Reviews
- Android official language: Getting started with Kotlin
- Android official language: Getting started with Kotlin
- Android official language: Getting started with Kotlin
- Android official language: Getting started with Kotlin
- Android official language: Getting started with Kotlin
Posts
Q&A
Class initializer ๊ฐ์๊ฐ Class inheritance ๋ก ์ฌ๋ผ์์์ต๋๋ค
์ด์ ์ง๋ญ ํ์ธํ์ต๋๋ค. ํ์ธ ํ ์์ ํ๋๋ก ํ๊ฒ ์ต๋๋ค.
- 0
- 1
- 251
Q&A
๊ฐ์์ค HashMap ๊ด๋ จ ์ง๋ฌธ
์๋ ํ์ธ์. ๋๋ฆฌ๋ค๋ ๋ถ๋ถ์ get/set์ ํ๋ฒ ๋ ํธ์ถํ๋ ๋ถ๋ถ ๋๋ฌธ์ ๋๋ฆด ์ ์๋ค๋ ๋ถ๋ถ์ ๋๋ค. ๊ธฐ์กด์๋ findViewById ๋ฅผ ํด๋๋ฉด ์ ์ญ์์ 1๋ฒ ํธ์ถ ํ์ ๋ค์ ํธ์ถํ์ง ์๊ณ , ๊ฐ์ ธ๋ค ์ฐ๋๋ฐ HashMap์ ํตํด ์๋ ์บ์์ฒ๋ฆฌ๋ฅผ ํด์ค ๊ฒฝ์ฐ ๋ถํ์ํ๊ฒ ๋ฉ์๋ ํธ์ถ์ด ๋ฐ์ํ๋ฉฐ, get์ ํธ์ถํ๋ ๋ถ๋ถ์ด ์๊ธฐ ๋๋ฌธ์ ์ค๋ช ํ ๋ถ๋ถ์ ๋๋ค. HashMap ์์ฒด์ ์ฑ๋ฅ์ ๋ํ ์ธ๊ธ์ ์๋์์ง๋ง, HashMap ์ฑ๋ฅ์ ์ธ๊ธ์ผ๋ก ๋ณด์ผ ์ ์๋ ์ ์ ์ฃผ์ํด์ ์ถํ ๊ฐ์ ํ๋๋ก ํ๊ฒ ์ต๋๋ค. ๋ณธ ๊ฐ์๋ Kotlin์ผ๋ก ์์ ํ๊ณ , ์ค์ Java ์ฝ๋๊ฐ ์ด๋ค์์ผ๋ก ์ ๊ทผํ๋ ๋ถ๋ถ์ ๊ตฌ์ฑํด๋ ๊ฐ์์ ๋๋ค.
- 0
- 2
- 262