How to iterate through 2d array to split the inner array in java
<p>I have the following 2d array:</p>

<pre><code>[[Reflux Symptom Sensitivity Index (Impedance)], [Symptom       Acid    Nonacid All Reflux], [Regurgitate       34% 71% 36%], [Stomach pain     21% 14% 19%], [Chest pain       3%  0%  3%], [], [Reflux Symptom Association Probability (Impedance)]]
</code></pre>

<p>I would like to all the inner arrays apart from the first one, by whitespace so that  I end up with:</p>

<pre><code>[[Reflux Symptom Sensitivity Index (Impedance)], [Symptom,Acid, Nonacid, All, Reflux], [Symptom,Acid, Nonacid, All, Reflux], [Symptom,Acid, Nonacid, All, Reflux],[Chest pain,3%,0%,3%]]
</code></pre>

<p>I could write the following code:</p>

<pre><code>ArrayList&lt;List&lt;String&gt;&gt; Arr_RSI_table2d = new ArrayList&lt;List&lt;String&gt;&gt;();
List&lt;String&gt; stats = Arr_RSI_table2d.get(1);
                // remove() returns the object that was removed
                String allStats = stats.remove(0);
                String allStats2=allStats.trim();
                Collections.addAll(stats, allStats2.split("\\s"));
                List&lt;String&gt; Arr_RSI_table2d_col2 = Arr_RSI_table2d.get(2);
                // remove() returns the object that was removed
                String All_Arr_RSI_table2d_col2 = Arr_RSI_table2d_col2.remove(0);
                String All_Arr_RSI_table2d_col2_2=allStats.trim();
                Collections.addAll(Arr_RSI_table2d_col2, All_Arr_RSI_table2d_col2_2.split("\\s"));

                List&lt;String&gt; Arr_RSI_table2d_col3 = Arr_RSI_table2d.get(3);
                // remove() returns the object that was removed
                String All_Arr_RSI_table2d_col3 = Arr_RSI_table2d_col3.remove(0);
                String All_Arr_RSI_table2d_col3_2=allStats.trim();
                Collections.addAll(Arr_RSI_table2d_col3, All_Arr_RSI_table2d_col3_2.split("\\s"));

                List&lt;String&gt; Arr_RSI_table2d_col4 = Arr_RSI_table2d.get(4);
                // remove() returns the object that was removed
                String All_Arr_RSI_table2d_col4 = Arr_RSI_table2d_col4.remove(0);
                String All_Arr_RSI_table2d_col4_2=allStats.trim();
                Collections.addAll(Arr_RSI_table2d_col4, All_Arr_RSI_table2d_col4_2.split("\\s"));
</code></pre>

<p>How can I do this?</p>