November 2018
Intermediate to advanced
388 pages
9h 5m
English
Kotlin has support for templates for the String type. This is useful because it helps us to avoid concatenation in code.
Let's look at an example for 4_StringTemplate.kts:
val name = "Atrium"println("Hello ${name}")
The output is as follows:

Let's look at 4a_StringTemplate.kts:
val name = "Atrium"println("Hello $name")
The output is as follows:
Now consider the following code in Java:
myName= "tanbul"System.out.println("my name is" + myName); ...Read now
Unlock full access