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