print variable kotln code example
Example 1: kotlin print statement
//Kotlin print statement
//print on its own line
println("Hello world")
//regular print statement, will go on top of last line
print("Hello world")
Example 2: kotlin variable in string
//Kotlin variable in string
//variables go in a ${} in a string, example
println("Happy ${age}th birdthday, ${name}!"