본문 바로가기 메뉴 바로가기



개발자의 리뷰 공간

프로필사진
  • 글쓰기
  • 관리
  • 태그
  • 방명록
  • RSS

개발자의 리뷰 공간

검색하기 폼
  • 분류 전체보기 (22)
    • 개발자의 아이템 (2)
    • 개발자의 앱 (1)
    • Web (3)
    • Android 구성 요소 (2)
      • Manifest (1)
      • Activity (1)
    • Android 개발 (4)
      • Architecture (1)
      • Libraries (1)
      • Android 오류 정리 (2)
    • Programming Language (6)
      • Java (6)
    • UI,UX (0)
    • 정리글 (0)
      • Jetpack Compose 정리 (0)
    • 개발자의 글쓰기 (0)
    • Kotlin (4)
      • Kotlin 기초 (4)
  • 방명록

sealed class 상속 (1)
Kotlin sealed class의 사용 방법과 특징 대해 알아보기 : Kotlin 1.5.0에서의 변경 사항

Kotlin의 sealed class Kotlin에서 Sealed class는 enum class와 비슷한 특징을 가지고 있지만, 더 많은 기능을 제공합니다. Sealed class를 사용하면 상속 관계를 표현할 수 있으며, 각 하위 클래스마다 고유한 동작을 수행할 수 있습니다. sealed class는 다음과 같이 선언할 수 있습니다. sealed class Color { object Red : Color() object Green : Color() object Blue : Color() } 위 예제에서 Color는 sealed class로 선언되어 있습니다. sealed class는 자신의 하위 클래스를 가질 수 있으며, 하위 클래스는 sealed class 내부 혹은 외부에 중첩 클래스, 데이터 클..

Kotlin/Kotlin 기초 2023. 2. 18. 21:57
이전 1 다음
이전 다음
반응형
공지사항
최근에 올라온 글
최근에 달린 댓글
Total
Today
Yesterday
링크
TAG
  • LocalDateTime
  • REST API란 무엇인가?
  • HTTP 100 Continue
  • HTTP 401 Unauthorized
  • sealed class 안정성
  • kotlin
  • Kotlin sealed class 상속
  • HTTP 301 Moved Permanently
  • sealed class 상속
  • REST API Plain Text
  • REST xml
  • sealed class enum
  • REST API HTML
  • REST API GET
  • REST API PUT
  • REST API POST
  • Android
  • ZonedDateTime
  • HTTP 400
  • HTTP 201
  • 코틀린 also
  • HTTP 204
  • REST JSON
  • java
  • sealed class 1.5.0
  • sealed class 특징
  • HTTP 404 Not Found
  • Kotlin sealed class
  • 500 Internal Server Error
  • sealed class 사용 방법
more
«   2025/06   »
일 월 화 수 목 금 토
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
글 보관함

Blog is powered by Tistory / Designed by Tistory

티스토리툴바