How to print String ArrayList? : <p>I have a loop in which i put <code>splited</code> parts of a string using object. Need to put them in a <code>ArrayList</code> and print the list, hod do i do that?</p>

<p>I tried to use for loop too, to print it.</p>

<pre><code>for(int i = 0; i &lt; parts.length; i += 4) {
            p.name = parts[i];
            p.lastName = parts[i + 1];
            p.dateBirth = LocalDate.parse(parts[i + 2], df1);
            p.placeBirth = parts [i + 3];
        }

        ArrayList lista = new ArrayList();
            lista.add(parts);
</code></pre>

<p>It should print things from <code>ArrayList</code> which i should add.</p>
