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
- studio
- 코틀린
- 안드로이드 스튜디오
- 레트로핏
- Android
- 안스
- WebView
- 안드로이드
- ADB
- 유튜브
- viewpager
- dart
- RecyclerView
- 에러
- GIT
- 안드로이드스튜디오
- Retrofit
- error
- 웹뷰
- 깃헙
- Kotlin
- 코루틴
- Github
- 스튜디오
- image
- MVVM
- build
- coroutine
- Gradle
- 의존성주입
Archives
- Today
- Total
목록class (1)
코딩하는 일용직 노동자

클래스 객체를 만들때 new 키워드를 생략이 가능하다. class Person { String name; int age; } var person = Person(); // new를 붙여도 되고 생략해도 된다. 생성자도 Java와 비슷하다. class Person { String name; int age; /* * String name, int age 로 하면 값을 받아서 다시 셋팅해주는 * 처리가 필요하지만 이렇게 하면 코드수를 줄일 수 있다. */ Person(this.name, this.age); } 코틀린의 .apply처럼 클래스의 값을 연속으로 셋팅해줄 수 있다. class Car { String _model; int _makeYear; void setModel(String model) { thi..
Dart
2020. 5. 17. 14:48