62
Java Byte floatValue() method
The floatValue() method of Java Byte class returns a float value for this Byte after a widening primitive conversion.
Syntax:
Parameters:
NA
Specified by
This method is specified by floatValue in class Number
Return Value
This method returns the numeric value of this object after conversion to type float.
Example 1
Output:
Float value : 98.0 Float value : 102.0
Example 2
Output:
-128.0 127.0
Example 3
Output:
Error:(8, 39) java: byte cannot be dereferenced
Next TopicJava Byte