Scala Int floatValue() method with example
Last Updated :
30 Jan, 2020
The floatValue() method is utilized to return the float value of the specified int value.
Method Definition: def floatValue(): Byte
Return Type: It returns the float value of the given int value.
Example #1:
object GfG
{
def main(args : Array[String])
{
val result = ( 15 ).floatValue
println(result)
}
}
|
Example #2:
object GfG
{
def main(args : Array[String])
{
val result = ( 1586 ).floatValue
println(result)
}
}
|
Share your thoughts in the comments
Please Login to comment...