Scala Float isValidChar() method with example
The isValidChar() method is utilized to return true if the specified number is either zero or lies within the range of scala.Char MinValue and MaxValue; otherwise returns false.
Method Definition: (Float_Number).isValidChar
Return Type: It returns true if the specified number is either zero or lies within the range of scala.Char MinValue and MaxValue; otherwise returns false.
Example #1:
object GfG
{
def main(args : Array[String])
{
val result = ( 0 ).isValidChar
println(result)
}
}
|
Example #2:
object GfG
{
def main(args : Array[String])
{
val result = ( 5.9 ).isValidChar
println(result)
}
}
|
Last Updated :
29 Oct, 2019
Like Article
Save Article
Share your thoughts in the comments
Please Login to comment...