Scala Float isInfinite() method with example
Last Updated :
29 Oct, 2019
The isInfinite() method is utilized to return true if the specified Float value is infinite otherwise return false.
Method Definition: (Number).isInfinite
Return Type: It returns true if the specified Float value is infinite otherwise return false.
Example #1:
object GfG
{
def main(args : Array[String])
{
val result = ( 5.4 ).isInfinite
println(result)
}
}
|
Example #2:
object GfG
{
def main(args : Array[String])
{
val result = ( 7 / 3 ).isInfinite
println(result)
}
}
|
Like Article
Suggest improvement
Share your thoughts in the comments
Please Login to comment...