I have a string:
String stringProfile = \"0,4.28 10,4.93 20,3.75\";
I am trying to turn it into an array like as follows:
d
Assuming that your string strictly follows the given sample pattern, you can make use of the following code:
String stringProfile = "0,4.28 10,4.93 20,3.75";
stringProfile = stringProfile.replace(' ', ',');
String [] strArry = stringProfile.split(",");
double [][] doubleArray = new double [strArry.length/2][2];
for(int i=0, j=0; i