Scala Short +(x: Double) method with example
Last Updated :
11 Nov, 2019
The +(x: Double) method is utilized to find the sum of the stated Short value and ‘x’ of type Double.
Method Definition: def +(x: Double): Double
Return Type: It returns Double.
Example: 1#
object GfG
{
def main(args : Array[String])
{
val result = ( 1000 ).+( 10.4311 )
println(result)
}
}
|
Example: 2#
object GfG
{
def main(args : Array[String])
{
val result = (- 1000 ).+( 54.1233 )
println(result)
}
}
|
Share your thoughts in the comments
Please Login to comment...