Scala Float toLong() method with example
Last Updated :
03 Nov, 2019
The toLong() method is utilized to convert the specified number into Long data type value. The range of the byte data type is from -9, 223, 372, 036, 854, 775, 808 to +9, 223, 372, 036, 854, 775, 807
Method Definition: (Number).toLong
Return Type: It returns the converted Long datatype value.
Example #1:
object GfG
{
def main(args : Array[String])
{
val result = ( 5676 ).toLong
println(result)
}
}
|
Example #2:
object GfG
{
def main(args : Array[String])
{
val result = ( 922365 ).toLong
println(result)
}
}
|
Like Article
Suggest improvement
Share your thoughts in the comments
Please Login to comment...