Scala Float toString() method with example
Last Updated :
29 Oct, 2019
The toString() method is utilized to convert the specified number into string data type value.
Method Definition: (Number).toString
Return Type: It returns the converted String datatype value.
Example #1:
object GfG
{
def main(args : Array[String])
{
val result = ( 56 ).toString
println(result)
}
}
|
Example #2:
object GfG
{
def main(args : Array[String])
{
val result = ( 56.9 ).toString
println(result)
}
}
|
Share your thoughts in the comments
Please Login to comment...