반응형
- 출처 https://www.youtube.com/watch?v=IDVnZPjRCYg&t=8s [Code with Joyce]
- ${}를 사용하여 표현식을 사용
val name = "kanginman"
val lastName = "Hong"
println("my name is ${name}") //결과값 my name is kanginman
println("my name is ${name + lastName}") //결과값 my name is kanginmanHong
println("is this true? ${1===0}") //결과값 is this true? false
println("this is 2$a") //결과값 this is 2$a
'코틀린+안드로이드' 카테고리의 다른 글
6. 조건문 (0) | 2020.07.16 |
---|---|
5. 주석 (0) | 2020.07.16 |
3. val vs var (0) | 2020.07.16 |
2. function (함수) (0) | 2020.07.16 |
1. Hello World (0) | 2020.07.16 |