Scala Int min() method with example
Last Updated :
23 Feb, 2021
The min() method is utilized to return the minimum value of the two specified int numbers.
Method Definition: (First_Number).min(Second_Number)Return
Type: It returns true the minimum value of the two specified int numbers.
Example 1:
Scala
object GfG
{
def main(args : Array[String])
{
val result = ( 5 ).min( 9 )
println(result)
}
}
|
Example 2:
Scala
object GfG
{
def main(args : Array[String])
{
val result = ( 5 ).min( 5 )
println(result)
}
}
|
Like Article
Suggest improvement
Share your thoughts in the comments
Please Login to comment...