Byte floatValue()
returns the Byte as a float.
floatValue
has the following syntax.
public float floatValue()
floatValue in class Number
floatValue
returns the float value from byte.
In the following code shows how to use Byte.floatValue() method.
public class Main { public static void main(String[] args) { Byte byteObject = new Byte("10"); float f = byteObject.floatValue(); System.out.println("float"+f); } }
The output: