"코틀린"의 두 판 사이의 차이

잔글 (봇: 자동으로 텍스트 교체 (-source +syntaxhighlight))
10번째 줄: 10번째 줄:


==예시==
==예시==
<source lang='kotlin'>
<syntaxhighlight lang='kotlin'>
fun main(args : Array<String>) {
fun main(args : Array<String>) {
   val scope = "world"
   val scope = "world"
   println("Hello, $scope!")
   println("Hello, $scope!")
}
}
</source>
</syntaxhighlight>
<source lang='kotlin'>
<syntaxhighlight lang='kotlin'>
fun sayHello(maybe : String?, neverNull : Int) {
fun sayHello(maybe : String?, neverNull : Int) {
   // use of elvis operator
   // use of elvis operator
22번째 줄: 22번째 줄:
   println("Hello $name")
   println("Hello $name")
}
}
</source>
</syntaxhighlight>


==같이 보기==
==같이 보기==

2020년 11월 2일 (월) 02:39 판

1 개요

Kotlin
코틀린
  • 정적 타입 객체지향 프로그래밍언어
  • 자바가상머신, 안드로이드 상에서 동작가능
  • 아파치 라이선스 2.0
  • 파일확장자: .kt, .kts

 

2 예시

fun main(args : Array<String>) {
  val scope = "world"
  println("Hello, $scope!")
}
fun sayHello(maybe : String?, neverNull : Int) {
   // use of elvis operator
   val name : String = maybe ?: "stranger"
   println("Hello $name")
}

3 같이 보기

4 참고

문서 댓글 ({{ doc_comments.length }})
{{ comment.name }} {{ comment.created | snstime }}