Scala Char min() method with example
Last Updated :
03 Nov, 2019
The min() method is utilized to find the minimum of the two specified characters.
Method Definition: def min(that: Char): Char
Return Type: It returns the character with the minimum value.
Example: 1#
object GfG
{
def main(args : Array[String])
{
val result = ( 'F' ).min( 'A' )
println(result)
}
}
|
Example: 2#
object GfG
{
def main(args : Array[String])
{
val result = ( 'a' ).min( 'A' )
println(result)
}
}
|
Share your thoughts in the comments
Please Login to comment...