ArrayList, how can I compare and etc within? (Java)
<p>So currently, I have an ArrayList that looks something like:</p>

<pre><code>[ [id, type, name, $], [id, type, name, $], [id, type, name, $], [id, type, name, $]....]
</code></pre>

<p>Now say if i want to compare index 0 with 1, or maybe I want to add another value after the comma:</p>

<p>[id, type, name, $, YOLO]</p>

<p>How would I go about doing this? thanks!</p>

<p>Edit: here something:</p>

<p>I am reading data from Excel:</p>

<pre><code>    for (int i = first; i &lt;= last; i++) {
        Row row = sheet.getRow(i);
        Cell id = row.getCell(0);
        Cell type = row.getCell(1);
        Cell name = row.getCell(2);
        Cell $ = row.getCell(3);

    List temp = new ArrayList();
    temp.add(id);
    temp.add(type);
    temp.add(name);
    temp.add($);
  sData.add(temp);

}
</code></pre>

<p>and then when you print sData, it shows exactly how I said earlier. </p>
