When I try to convert a string array to a double array, I keep getting a "floatingdecimal.readjavaformatstring" error. Note that the string array looks something like this: (but it goes on for much longer)
7.641844673,7.643565703,7.319638605,7.42366145,7.419292812,7.388869123,7.53670762,7.749329445,7.625242329,7.322164604,7.315094508,7.403445746,7.890969983,7.544904537,7.677043042,7.477693567,7.527992118,7.415580204,7.417685294,7.393078839
And my conversion looks like this: (where str1 is a String[] )
double[] array1 = new double[str1.length];
for (int i = 0; i < array1.length; i++)
{
array1[i] = Double.parseDouble(str1[i]);
}
I'm pretty sure that the conversion is correct, but there's something in my string that's amiss, such as an extra comma or something. Do you have any suggestions as to how I can fix my string? Or do you think I should do my conversion differently?
Thanks a lot,
KJM