본문 바로가기

조용한 담장

검색하기
조용한 담장
프로필사진 iosroid

  • 분류 전체보기 (125)
    • Flutter (43)
    • tips (10)
    • Dart (14)
    • Interesthing (6)
    • python (6)
    • kotlin (40)
    • Blogs I read this week (3)
    • Yocto (1)
Guestbook
Notice
Recent Posts
Recent Comments
Link
«   2025/05   »
일 월 화 수 목 금 토
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
Tags
  • map
  • 함수
  • python
  • Class
  • 파이썬
  • 콜렉션
  • import
  • pushnamed
  • crawler
  • function
  • 클래스
  • textstyle
  • 다트
  • package
  • DART
  • variable
  • texttheme
  • Collection
  • 플러터
  • animation
  • ML
  • kotlin
  • Android
  • text
  • set
  • 코틀린
  • Flutter
  • 크롤러
  • List
  • 웹크롤러
more
Archives
Today
Total
관리 메뉴
  • 글쓰기
  • 방명록
  • RSS
  • 관리

목록중첩클래스 (1)

조용한 담장

코틀린(Kotlin) 클래스(Class) : 중첩 클래스 와 내부 클래스 (Nested and Inner Classes)

코틀린의 중첩 클래스(nested class) 와 내부 클래스(inner class) 에 대해 알아보자. 원문 https://kotlinlang.org/docs/reference/nested-classes.html 을 보며 정리. Nested classes class Outer { private val bar: Int = 1 class Nested { fun foo() = 2 } } val demo = Outer.Nested().foo() // == 2 Inner classes 중첩 클래스는 inner 로 표시하고 외부클래스(outer class) 에서 멤버의 접근이 가능하다. 내부 클래스는 외부 클래스의 오브젝트 레퍼런스를 가지고 있다. class Outer { private val bar: Int =..

kotlin 2019. 12. 31. 18:35
Prev 1 Next

Blog is powered by kakao / Designed by Tistory

티스토리툴바