how convert number to string scala code example Example: int to string scala val x = 42 x.toString // gives "42"