Scala Int -(x: Short) method with example
The -(x: Short) method is utilized to return the difference of the specified int value and short value.
Method Definition: (Int_Value).-(Short_Value)
Return Type: It returns the difference of the specified int value and short value.
Example #1:
object GfG
{
def main(args : Array[String])
{
val result = ( 100 ).-( 50 )
println(result)
}
}
|
Example #2:
object GfG
{
def main(args : Array[String])
{
val result = ( 10 ).-( 5 )
println(result)
}
}
|
Last Updated :
11 Nov, 2019
Like Article
Save Article
Share your thoughts in the comments
Please Login to comment...