코틀린+안드로이드

4. String Template 문자열 템플릿

으누아빠 2020. 7. 16. 21:32
반응형
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