Scala Char isUpper() method with example
Last Updated :
03 Nov, 2019
The isUpper() method is utilized to check if the stated character value is in uppercase or not.
Method Definition: def isUpper: Boolean
Return Type: It returns true if the stated character is in uppercase else it returns false.
Example: 1#
object GfG
{
def main(args : Array[String])
{
val result = ( 'A' ).isUpper
println(result)
}
}
|
Example: 2#
object GfG
{
def main(args : Array[String])
{
val result = ( 'a' ).isUpper
println(result)
}
}
|
Share your thoughts in the comments
Please Login to comment...