일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
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 |
- texttheme
- text
- Android
- Flutter
- map
- 웹크롤러
- python
- List
- Collection
- pushnamed
- 클래스
- crawler
- 파이썬
- set
- ML
- 크롤러
- kotlin
- textstyle
- DART
- Class
- function
- 플러터
- 코틀린
- 다트
- 함수
- import
- variable
- package
- 콜렉션
- animation
- Today
- Total
목록분류 전체보기 (125)
조용한 담장

코틀린의 Visibility Modifier 를 살펴보자. 원문 https://kotlinlang.org/docs/reference/visibility-modifiers.html 을 보며 정리. class, object, interface, constructor, function, property 와 그들의 setter 들은 visibility modifier 를 가질 수 있다. visibility modifier : private, protected, internal, public 기본은 public 이다. Packages function, property 와 class, object 와 interface 는 package 내에서 최상위에서 바로 선언할 수 있다. // file name: example..

코틀린의 인터페이스(interface) 에 대해 알아보자. 원문 https://kotlinlang.org/docs/reference/interfaces.html 을 보며 정리. interface 키워드를 사용하는 인터페이스는 추상화 메소드와 그 구현 코드를 가지고 있고 state 는 저장할 수 없다. interface MyInterface { fun bar() fun foo() { // optional body } } Implementing Interfaces 한개의 클래스나 오브젝트는 한개 이상의 인터페이스를 가질 수 있다. class Child : MyInterface { override fun bar() { // body } } Properties in Interfaces 인터페이스는 propert..

코틀린 클래스의 프로퍼티(property) 와 필드(field) 에 대해 살펴보자. 원문 https://kotlinlang.org/docs/reference/properties.html 을 보며 정리. Declaring Properties property 는 var 또는 var 로 선언된다. class Address { var name: String = "Holmes, Sherlock" var street: String = "Baker" var city: String = "London" var state: String? = null var zip: String = "123456" } fun copyAddress(address: Address): Address { val result = Address() ..

코틀린(kotlin)의 returns and jumps 를 보자. 원문 https://kotlinlang.org/docs/reference/returns.html 을 보며 정리. kotlin structural jump expressions : return, break, continue 위 세계의 표현은 Nothing type 이다. val s = person.name ?: return Break and Continue Labels expression 은 label 로 표시될 수 있으며 식별자(identifier) @ 뒤에 붙는다. 예) abc@, foobar@ 참조 : grammar for label 아래와 같이 break 나 continue 가 jump 할 대상의 label 을 expression 앞..