How to convert the value of Integer number object to double primitive data type in Java

1 Answer

0 votes
package javaapplication1;

public class JavaApplication1 {
 
    public static void main(String[] args) {
        
        Integer i = 31;
        double d;
        
        d = i.doubleValue();

        System.out.println(d);
    }
}
 
/*
run:

31.0
 
*/

 



answered Sep 6, 2016 by avibootz
...