“Variável Kotlin em String” Respostas de código

Variável Kotlin em String

//Kotlin variable in string

//variables go in a ${} in a string, example
println("Happy ${age}th birdthday, ${name}!"
gradient

variáveis ​​dentro de cordas Kotlin

// Use the $ sign to get the variable value inside a string:

//Example 1:
println("$days days and $hours hours to go!")
  
//You can also use {} to contain expressions:
println("${days*24} hours to go!")
println("${myList}")
Nani

Respostas semelhantes a “Variável Kotlin em String”

Perguntas semelhantes a “Variável Kotlin em String”

Mais respostas relacionadas para “Variável Kotlin em String” em Java

Procure respostas de código populares por idioma

Procurar outros idiomas de código