Skip to content

Instantly share code, notes, and snippets.

@stephanos
Created October 20, 2012 09:13
Show Gist options
  • Select an option

  • Save stephanos/3922741 to your computer and use it in GitHub Desktop.

Select an option

Save stephanos/3922741 to your computer and use it in GitHub Desktop.
scala> val n = 10
n: Int = 10
scala> "Bob is " + n + " years old"
res0: String = Bob is 10 years old
scala> "Bob is $n years old"
res1: String = Bob is $n years old
scala> s"Bob is $n years old"
res1: String = Bob is 10 years old
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment