Is there any way to convert a Long data type to Double or double?
Long
Double
double
For example, I need to convert 15552451L to a
15552451L
You could simply do :
double d = (double)15552451L;
Or you could get double from Long object as :
Long l = new Long(15552451L); double d = l.doubleValue();
I think it is good for you.
BigDecimal.valueOf([LONG_VALUE]).doubleValue()
How about this code? :D