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