Double doubleValue() method in Java with examples Last Updated : 12 Jan, 2023 Comments Improve Suggest changes Like Article Like Report The doubleValue() method of Double class is a built in method to return the value specified by the calling object as double after type casting. Syntax: DoubleObject.doubleValue() Return Value: It return the value of DoubleObject as double. Below programs illustrate doubleValue() method in Java: Program 1: Java // Java code to demonstrate // Double doubleValue() method class GFG { public static void main(String[] args) { // Double value Double a = 17.47; // wrapping the Double value // in the wrapper class Double Double b = new Double(a); // doubleValue of the Double Object double output = b.doubleValue(); // print doubling the output System.out.println("Double value of " + b + " is : " + output); } } Output:Double value of 17.47 is : 17.47 Program 2: Java // Java code to demonstrate // Double doubleValue() method class GFG { public static void main(String[] args) { String value = "54.1"; // wrapping the Double value // in the wrapper class Double Double b = new Double(value); // doubleValue of the Double Object double output = b.doubleValue(); // print doubling the output System.out.println("Double value of " + b + " is : " + output); } } Output:Double value of 54.1 is : 54.1 Comment More infoAdvertise with us Next Article Double doubleValue() method in Java with examples S ShivamKD Follow Improve Article Tags : Java Java-lang package Java-Functions Java-Double Practice Tags : Java Similar Reads DoubleAdder doubleValue() method in Java with Examples The java.DoubleAdder.doubleValue() is an inbuilt method in java that is equivalent to the method sum(), that is it returns current sum value. When the object of the class is created its initial value is zero. Syntax: public double doubleValue() Parameters: The method does not accepts any parameter. 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 DoubleAccumulator doubleValue() method in Java with Examples The Java.DoubleAccumulator.doubleValue() is an inbuilt method in java that is equivalent to get() method, it means it only returns the current value and does not takes any parameter. The return type of this method is int. Syntax: public double doubleValue() Parameters: The function does not accepts 2 min read AtomicLong doubleValue() method in Java with examples The Java.util.concurrent.atomic.AtomicLong.doubleValue() is an inbuilt method in java which returns the current value of the AtomicLong as a Double data-type after performing primitive conversion. Syntax: public double doubleValue() Parameters: The function does not accepts any parameter. Return val 1 min read Byte byteValue() method in Java with examples The byteValue method of Byte class is a built in method in Java which is used to return the value of this Byte object as byte. Syntax ByteObject.byteValue() Return Value: It returns the value of ByteObject as byte. Below is the implementation of byteValue() method in Java: Example 1: Java // Java co 2 min read Like