Scala Short min() method with example
Last Updated :
11 Nov, 2019
The min() method is utilized to find the minimum of the two specified Short types.
Method Definition: def min(that: Short): Short
Return Type: It returns the number of type Short with the minimum value.
Example: 1#
object GfG
{
def main(args : Array[String])
{
val result = ( 1000 ).min( 998 )
println(result)
}
}
|
Example: 2#
object GfG
{
def main(args : Array[String])
{
val result = ( 445 ).min( 1000 )
println(result)
}
}
|
Share your thoughts in the comments
Please Login to comment...