Java Double doubleValue() MethodThe doubleValue() method of Java Double class returns the double value of this Double object. SyntaxParametersNA Return valueThe doubleValue() method returns the double value represented by this object. Example 1Output: Result after being converted to double value = 22.8 Result after being converted to double value = 224.0 Example 2Output: Error:(13, 83) java: double cannot be dereferenced Double is a primitive data type. Its object cannot be used to call the Double class method. If you do so, it will give an error like above. Next TopicJava-double-equals-method |
We provides tutorials and interview questions of all technology like java tutorial, android, java frameworks
G-13, 2nd Floor, Sec-3, Noida, UP, 201301, India