Byte floatValue() method in Java with examples Last Updated : 08 Oct, 2018 Comments Improve Suggest changes Like Article Like Report The floatValue() method of Byte class is a built in method in Java which is used to return the value of this Byte object as float. Syntax ByteObject.floatValue() Return Value: It return the value of ByteObject as float. Below is the implementation of floatValue() method in Java: Example 1: Java // Java code to demonstrate // Byte floatValue() method class GFG { public static void main(String[] args) { // byte value byte a = 17; // wrapping the byte value // in the wrapper class Byte Byte b = new Byte(a); // floatValue of the Byte Object float output = b.floatValue(); // printing the output System.out.println("Float value of " + a + " is : " + output); } } Output: Float value of 17 is : 17.0 Example 2: Java // Java code to demonstrate // Byte floatValue() method class GFG { public static void main(String[] args) { String value = "17"; // wrapping the byte value // in the wrapper class Byte Byte b = new Byte(value); // floatValue of the Byte Object float output = b.floatValue(); // printing the output System.out.println("Float value of " + b + " is : " + output); } } Output: Float value of 17 is : 17.0 Comment More infoAdvertise with us Next Article Byte floatValue() method in Java with examples S ShivamKD Follow Improve Article Tags : Java Java - util package Java-Functions Java-Byte Practice Tags : Java Similar Reads Float byteValue() method in Java with Examples The java.lang.Float.byteValue() is a built-in method in Java that returns the value of this Float as a byte(by casting to a byte). Basically it used for narrowing primitive conversion of Float type to a byte value. Syntax: public byte byteValue() Parameters: The function does not accept any paramete 2 min read Number.floatValue() method in java with examples The floatValue() method is an inbuilt method in Java from the java.lang.Number class. This method is used when we want to extract the value of a Number object as a float data type. This may involve rounding or truncation, because this method returns the numeric value of the current object converted 2 min read Byte intValue() method in Java with examples The intValue() method of Byte class is a built in method in Java which is used to return the value of this Byte object as int. Syntax ByteObject.intValue() Return Value: It returns the value of ByteObject as int. Below is the implementation of intValue() method in Java: Example 1: Java // Java code 2 min read Short floatValue() method in Java with Example The java.lang.Short.floatValue() method of Short class is a built in method in Java which is used to return the value of the Short object as a float. Syntax: public float floatValue() Return type: It return the value of ShortObject as float. Below is the implementation of floatValue() method in Java 2 min read Byte hashCode() method in Java with examples The hashCode() method of Byte class is a built in method in Java which is used to return the hash code of the ByteObject. Note: The hashCode() returns the same value as intValue(). Syntax ByteObject.hashCode() Return Value: It return an int value which represents the hashcode of the specified Byte o 2 min read Like