Integer doubleValue() Method in Java Last Updated : 07 Jul, 2018 Summarize Comments Improve Suggest changes Share Like Article Like Report The doubleValue() method of Integer class of java.lang package is used to convert the value of the given Integer to a Double type after a widening primitive conversion and returns it. Syntax: public double doubleValue() Parameters: The method does not take any parameter. Return Value: This method returns a numeric value represented by this object after conversion to double type. Below programs illustrate java.lang.Integer.doubleValue() method. Program 1: java // Code to illustrate doubleValue() method import java.lang.Integer; class Gfg { // Driver code public static void main(String args[]) { Integer a = new Integer(14); // Convert Integer number to double value double b = a.doubleValue(); System.out.println(b); } } Output: 14.0 Program 2: java // Code to illustrate doubleValue() method import java.lang.Integer; class Gfg { // Driver code public static void main(String args[]) { Integer a = new Integer(120); // Convert Integer number to double value double b = a.doubleValue(); System.out.println(b); } } Output: 120.0 Comment More infoAdvertise with us Next Article Integer floatValue() Method in Java N Niraj_Pandey Follow Improve Article Tags : Java Practice Tags : Java Similar Reads Integer floatValue() Method in Java floatValue() method of Integer class present inside java.lang package is used to convert the value of the given Integer to a float type after a widening primitive conversion which in general is mostly applicable when we want to truncate or rounding-off the integer value. The package view is as follo 2 min read Java Integer byteValue() Method The byteValue() method of Integer class of java.lang package converts the given Integer into a byte after a narrowing primitive conversion and returns it (value of integer object as a byte). Also, remember this method does override byteValue() method of the Number class. The package view is as follo 2 min read Integer decode() Method in Java It is often seen that any integer within (" ") is also considered as string, then it is needed to decode that into the integer. The main function of java.lang.Integer.decode() method is to decode a String into an Integer. The method also accepts decimal, hexadecimal, and octal numbers. Syntax : publ 2 min read Integer hashCode() Method in Java The java.lang.Integer.hashCode() method of Integer class in Java is used to return the hash code for a particular Integer . Syntax: public int hashCode() Parameters : The method does not take any parameters. Return Value: The method returns a hash code integer value for this object, which is equal t 2 min read Java Integer compare() method The compare() method of Integer class of java.lang package compares two integer values (x, y) given as a parameter and returns the value zero if (x==y), if (x < y) then it returns a value less than zero and if (x > y) then it returns a value greater than zero. Syntax : public static int compar 2 min read Double intValue() method in Java with examples The intValue() method of Double class is a built in method to return the value specified by the calling object as int after type casting. Syntax: DoubleObject.intValue() Return Value: It return the value of DoubleObject as int. Below programs illustrate intValue() method in Java: Program 1: Java // 2 min read Like