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