Notice
Recent Posts
Recent Comments
Link
250x250
일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
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
- LifeCycle
- 안드로이드
- livedata
- Flutter
- 앱
- Navigation
- Button
- DART
- binding
- Compose
- Dialog
- Kotlin
- scroll
- drift
- CustomScrollView
- viewmodel
- 계측
- intent
- TEST
- activity
- android
- textfield
- ScrollView
- 앱바
- appbar
- Coroutines
- tabbar
- data
- 테스트
- textview
Archives
- Today
- Total
목록데이터클래스 (1)
Study Record
[Kotlin] data class (데이터 클래스), Destructuring declarations
😶 data class (데이터 클래스) 데이터 클래스는 데이터를 보유하는 것이 주된 목적의 클래스이다. data class User(val name: String, val age: Int) 데이터 클래스 주의점 데이터 클래스에는 생성자에 매개변수가 하나 이상 있어야 하며 모든 생성자 매개변수는 val, var 로 표시되어야 한다. 또한, 데이터 클래스는 abstract 또는 open, sealed, inner 일 수 없다. 데이터 클래스는 .componentN(), copy() 함수에 대한 명시적인 구현은 허용되지 않는다. 데이터 클래스는 자동으로 componentN() 함수를 생성해 주기 때문에 Destruction declaration 이 가능하다. 😶 Destructuring declaration..
안드로이드/Kotlin
2023. 8. 31. 22:07