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