title: How to print a List into a table format
body: <p>I'm in the process of learning Java and Have a very simple requirement which I can't seem to figure out where I'm going wrong. A simple ArrayList which writes to console</p>
  <blockquote>
  <p>FirstName</p>
  <p>SurName</p>
  <p>Dob</p>
  </blockquote>
  <pre><code>ArrayList&lt;String&gt; myList = new ArrayList&lt;String&gt;();
      
  myList.add(&quot;FirstName&quot;);
  myList.add(&quot;Another FirstName&quot;);
  myList.add(&quot;SurName&quot;);
  myList.add(&quot;Another SurName&quot;);
  myList.add(&quot;Dob&quot;);
  myList.add(&quot;Another Dob&quot;);
  </code></pre>
  <p>I can't seem to figure out how can I print them in one line i.e</p>
  <blockquote>
  <p>FirstName Surname Dob</p>
  <p>Another FirstName Another SurName Another Dob</p>
  </blockquote>
  <p>Thanks in advance for all your help.</p>