Scala Long /(x: Double) method
Last Updated :
02 Nov, 2019
In Scala, Long is a 64-bit signed integer, which is equivalent to Java’s long primitive type. The /(x: Double) method is utilized to return the quotient of this value and given value x.
Method Definition – def /(x: Double): Double
Returns – Returns the quotient of this value and x.
Example #1:
object GfG
{
def main(args : Array[String])
{
val result = ( 12 .toLong)./( 3 : Double)
println(result)
}
}
|
Example #2:
object GfG
{
def main(args : Array[String])
{
val result = ( 165 .toLong)./( 15 : Double)
println(result)
}
}
|
Share your thoughts in the comments
Please Login to comment...