Removing decimal point from double value
807580Oct 21 2009 — edited Oct 22 2009This is probably pretty simple but I can't come up with an easy way of doing it. I would like to store a number of double values in an array. Unfortunately, I run out of memory and get a java.lang.OutOfMemoryError. In order to save some space, I'd like to convert this double into an integer (only in representation) and store the integer instead.
i.e. I want to take the double value 123.456 and turn it into a 123456 integer value, and store that instead.
When time comes to read the values in the array, I'd like to do the reverse.
i.e. I want to take the 123456 value and turn it to 123.456.
Thank you in advance.