How to convert int to string in Scala

1 Answer

0 votes
object O {
    def main(args: Array[String]): Unit = {
        val n = 5498

        val s = n.toString()
        
        if (s == "5498")
            println(5498)
    }
}



/*
run:

5498

*/

 



answered Sep 6, 2020 by avibootz
...