In Scala, I want to print the price of some item with string interpolation. Is it possible to display the $ character with interpolation? This works:
scala> println(s"It only costs ${3 + 4} dollars")
It only costs 7 dollars
So why does this not work? It should still say $7, according to the docs
scala> println(s"It only costs $${3 + 4}")
It only costs ${3 + 4}