“Variable Kotlin en chaîne” Réponses codées

Variable Kotlin en chaîne

//Kotlin variable in string

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

Variables à l'intérieur des cordes 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

Réponses similaires à “Variable Kotlin en chaîne”

Questions similaires à “Variable Kotlin en chaîne”

Plus de réponses similaires à “Variable Kotlin en chaîne” dans Java

Parcourir les réponses de code populaires par langue

Parcourir d'autres langages de code