조햄의 쪼렙 탈출기

  • 홈
  • 태그
  • 방명록

constructor 1

kotlin in Action 4장 예제 (by, selaed, factory method, constructor)

by 예제 interface Attackable { fun attack(): String } class Knife : Attackable { override fun attack() = "attack with knife" } class Gun : Attackable { override fun attack() = "attack with gun" } class Attacker(val impl: Attackable) : Attackable by impl { fun attackEmoji() = "${attack()} 😱😵" } fun main() { println(Attacker(Knife()).attackEmoji()) println(Attacker(Gun()).attackEmoji()) } 하위 클래스가 상위..

Languages 2020.04.26
이전
1
다음
더보기
프로필사진

조햄의 쪼렙 탈출기

(현) 캐럿 (패러닷) 에서 일하는 서버 개발자 (전) 네이버 지도에서 일하는 BE 개발자 🎓 Yonsei Univ. Computer Science

  • 분류 전체보기
    • 개발log
    • error
    • Backend
    • Languages

Tag

spring boot, lambda, kotlin springboot, JPA, spring, kotlin in action, Kotlin, refactoring, Error, Java, filter, Collection, Transactional, pg_trgm, kotlin java, kotlin java 혼용, refactor, IntelliJ, map, SpringBoot,

최근글과 인기글

  • 최근글
  • 인기글

최근댓글

공지사항

페이스북 트위터 플러그인

  • Facebook
  • Twitter

Archives

Calendar

«   2025/07   »
일 월 화 수 목 금 토
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

방문자수Total

  • Today :
  • Yesterday :

Copyright © Kakao Corp. All rights reserved.

  • github

티스토리툴바