title: Java: New line separator inserted in ArrayList
body: <p>I have the following ArrayList of Strings: A01, A02, A03, B01, B02, B03, C01, C02, C03, D01, D02, D03.
  How can I print this ArrayList on several lines, each line when the first character modifies, such as</p>
  <pre><code>A01, A02, A03
  B01, B02, B03
  C01, C02, C03
  D01, D02, D03
  </code></pre>
  <p>My code is as follows:</p>
  <pre><code>private static List&lt;String&gt; seatsList = new ArrayList&lt;&gt;();
     for (char row = 'A'; row &lt;= 'D'; row++) {
          for (int i = 1; i &lt;= 3; i++) {
              seatsList.add(row + String.format(&quot;%02d&quot;, i));
          }
      }
  </code></pre>
  <p>where &quot;seatsList&quot; contains A01, A02, A03, B01, B02, B03, C01, C02, C03, D01, D02, D03. And I want to print each group starting with different letter on another line.</p>