본문 바로가기

변명은 만개 결과는 한개

검색하기
변명은 만개 결과는 한개
프로필사진 노마십가

  • 분류 전체보기 (97)
    • 공부 (90)
      • Android (5)
      • Kotlin (17)
      • Tizen wearable (6)
      • C# (1)
      • C++ (2)
      • Problem Solving (33)
      • ML (2)
      • 창고 (2)
      • Discord (7)
      • git (11)
      • Python (2)
      • 임시 보관 (0)
    • 일상 (2)
Guestbook
Notice
Recent Posts
Recent Comments
Link
반응형
«   2026/01   »
일 월 화 수 목 금 토
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
  • 디스코드
  • remote
  • Push
  • Java
  • 봇
  • 파이썬
  • BOT
  • 백준
  • PS
  • Kotlin
  • discord
  • Branch
  • Commit
  • 타이젠
  • Python
  • 깃허브
  • 입출력
  • 반복
  • 깃
  • Git
  • 풀리퀘스트
  • For
  • 별찍기
  • 출력
  • github
  • 자바
  • PR
  • Tizen
  • 코틀린
  • C++
more
250x250
관리 메뉴
  • 글쓰기
  • 방명록
  • RSS
  • 관리

목록Interface (1)

변명은 만개 결과는 한개

[Kotlin] class

Class 생성자 class 클래스이름 constructor(변수){ } 또한 아래와 같이 다중 생성자를 가질 수 있음 class Sample constructor(val name: String, val arg: Int) { constructor(name: String) : this(name, 0) } class 를 정의함과 동시에 오는 생성자를 primary constructor 라 부르고, 그 이외의 생성자들을 secondary constructor 라 부른다. primary constructor 아래와 같이 constructor 생략 가능하다 class Sample (val name: String, val age: Int) { ... } 자바 생성자와 다르게 변수에 대한 타입을 바로 가질 수 있으며..

공부/Kotlin 2020. 11. 10. 01:20
이전 Prev 1 Next 다음

Blog is powered by kakao / Designed by Tistory

티스토리툴바