Float doubleValue() method in Java with examples Last Updated : 11 Jul, 2025 Summarize Comments Improve Suggest changes Share Like Article Like Report The doubleValue() method of Float class is a built in method to return the value specified by the calling object as double after type casting. Syntax: FloatObject.doubleValue() Return Value: It return the double value of this Float object. Below programs illustrate doubleValue() method in Java: Program 1: Java // Java code to demonstrate // Float doubleValue() method class GFG { public static void main(String[] args) { // Float value float a = 17.65f; // wrapping the Float value // in the wrapper class Float Float b = new Float(a); // doubleValue of the Float Object double output = b.doubleValue(); // print doubling the output System.out.println("Float value of " + b + " is : " + output); } } Output:Float value of 17.65 is : 17.649999618530273 Program 2: Java // Java code to demonstrate // Float doubleValue() method class GFG { public static void main(String[] args) { // Float value float a = 6.0f; // wrapping the Float value // in the wrapper class Float Float b = new Float(a); // doubleValue of the Float Object double output = b.doubleValue(); // print doubling the output System.out.println("Float value of " + b + " is : " + output); } } Output:Float value of 6.0 is : 6.0 Reference: https://docs.oracle.com/javase/7/docs/api/java/lang/Float.html#doubleValue() Comment More infoAdvertise with us Next Article Byte doubleValue() method in Java with examples G gopaldave Follow Improve Article Tags : Java Java-lang package Java-Functions Java-Float 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 DoubleAdder floatValue() method in Java with Examples The java.DoubleAdder.floatValue() is an inbuilt method in java that returns the sum() as an float after a narrowing primitive conversion. When the object of the class is created its initial value is zero. Syntax: public float floatValue() Parameters: This method does not accepts any parameter. Retur 1 min read Byte doubleValue() method in Java with examples The doubleValue() method of Byte class is a built in method in Java which is used to return the value of this Byte object as double. Syntax ByteObject.doubleValue() Return type: It returns the value of ByteObject as double. Below is the implementation of doubleValue() method in Java: Example 1: Java 2 min read Short doubleValue() method in Java with Examples The java.lang.Short.doubleValue() method of Short class is a built in method in Java which is used to return the value of the Short object as a double. Syntax: public double doubleValue() Return type: It return the value of ShortObject as double. Below is the implementation of doubleValue() method i 2 min read Float equals() method in Java with examples The equals() method in Float Class is a built-in function in java that compares this object to the specified object. The result is true if and only if the argument is not null and is a Float object that contains the same double value as this object. It returns false if both the objects are not same. 3 min read Number.doubleValue() method in java with examples The Number.doubleValue() is an inbuilt method in Java from java.lang.Number package. This method returns the value of the specified number cast as a double data type. This may involve rounding or truncation.Syntax of doubleValue() Methodpublic abstract double doubleValue()Parameters: This method doe 3 min read Like