convert object that holds a double to a string and then back to double
<p>I have a two Dimensional Object array <strong>(Object[][] data)</strong> that holds pairs of products-prices.<br>
I try to pass these values to a Map with the following way.  </p>

<pre><code>private String myPairs = "";
private String[] l, m;

for (int i=0; i&lt;data.length; i++){
    myPairs += (String)data[i][0] + ":" + String.valueOf(data[i][1]) + ",";
}

Map&lt;String, Double&gt; pairs = new java.util.HashMap&lt;&gt;();
l = myPairs.split(",");

for (int i=0; i&lt;l.length; i++){
    m = l[i].split(":");
    pairs.put((String)m[0], Double.parseDouble((String)m[1]));             
}
</code></pre>

<p>I get a <code>java.lang.ArrayIndexOutOfBoundsException</code>. What's the wrong I have done?</p>
