Home »
Code Examples »
Scala Code Examples
Scala - Using String interpolation to print a variable Code Example
The code for Using String interpolation to print a variable
println("Using String interpolation to print a variable")
val mobileModel: String = "iPhone 13 Pro Max"
println(s"My personal mobile is $mobileModel")
/*
Output:
Using String interpolation to print a variable
My personal mobile is iPhone 13 Pro Max
*/
Code by IncludeHelp,
on August 8, 2022 03:06