Scala Char toLong() method with example
Last Updated :
03 Nov, 2019
The toLong() method is utilized to convert a stated character into Long or its ASCII value of type Long.
Method Definition: def toLong: Long
Return Type: It returns Long or ASCII value of the corresponding letter of type Long.
Example: 1#
object GfG
{
def main(args : Array[String])
{
val result = '\u1155' .toLong
println(result)
}
}
|
Example: 2#
object GfG
{
def main(args : Array[String])
{
val result = '\u1234' .toLong
println(result)
}
}
|
Like Article
Suggest improvement
Share your thoughts in the comments
Please Login to comment...