How to write string templates?

Report a typo

You need to output the date:

val month = "August"
val day = 22
val year = 2018

Select the correct way to do it with string templates.

a)

println("{} {}, {}", month, day, year)

b)

println("%month %day, %year")

c)

println("$month $day, $year")

d)

println("{month} {day}, {year}")
Select one option from the list
___

Create a free account to access the full topic