Notice
Recent Posts
Recent Comments
Link
반응형
목록open class (1)
변명은 만개 결과는 한개

클래스 상속(class inheritance) open class 코틀린은 class에 open 키워드를 붙이지 않으면 기본적으로 final 이다. 그러므로 클래스의 상속 을 하기 위해서는 open 키워드로 final 키워드를 제거해주어야한다 open class Empty(a: Int) class Sample(a: Int) : Empty() java View class 상속 ConstraintLayout 상속받는 코드를 예시로 생성자 연습 // secondary 생성자 활용 class CustomConstraintLayout( context: Context, attrs: AttributeSet?, defStyleAttr: Int) : ConstraintLayout(context, attrs, defSty..
공부/Kotlin
2020. 11. 19. 20:15