Android ● ○ ○ Kotlin 2.0

Kodebits Day 73: String Template

Aug 10 2026
Practice strings with a short kotlin challenge.

What is the output?

fun main() {
  val x = 3
  val y = 7
  val s = "Sum: ${x + y}"
  println(s)
}


Try it in the online Kotlin Playground →

[spoiler title="Solution"]

Answer:

Sum: 10

Explanation:

String templates evaluate expressions inside ${}.

[/spoiler]


Further Reading