How to declare Java Array and insert data into it
<p>I'm new to Java. I want to create Java Array and insert data into it. I found this code:</p>

<pre><code>ArrayList&lt;SessionsArray&gt; sessionList = 
        new ArrayList&lt;SessionsArray&gt;(

      Arrays.asList( new SessionsArray("A0001", "Intel CPU", new BigDecimal("700.00"), 1),
             new SessionsArray("A0002", "Harddisk 10TB", new BigDecimal("500.00"), 2),
             new SessionsArray("A0003", "Dell Laptop", new BigDecimal("11600.00"), 8),
             new SessionsArray("A0004", "Samsung LCD", new BigDecimal("5200.00"), 3),
             new SessionsArray("A0005", "A4Tech Mouse", new BigDecimal("100.00"), 10)
    ));
</code></pre>

<p>How I can declare the Array in tho parts and insert and remove data form it? Something like this:</p>

<pre><code>//declare the Array

ArrayList&lt;SessionsArray&gt; sessionList = new ArrayList&lt;SessionsArray&gt;();

//insert into Array

ArrayList&lt;SessionsArray&gt;(Arrays.asList( new SessionsArray("A0001", "Intel CPU", new BigDecimal("700.00"), 1),
             new SessionsArray("A0002", "Harddisk 10TB", new BigDecimal("500.00"), 2),
             new SessionsArray("A0003", "Dell Laptop", new BigDecimal("11600.00"), 8),
             new SessionsArray("A0004", "Samsung LCD", new BigDecimal("5200.00"), 3),
             new SessionsArray("A0005", "A4Tech Mouse", new BigDecimal("100.00"), 10)
    ));
</code></pre>

<p>Best wishes</p>

<pre><code> **EDIT** 
</code></pre>

<p>I want to use it because I want to get data from database and pass it to JSF page? Is there other way to pass data from database to JSF page?</p>

<pre><code>**EDIT 2**
</code></pre>

<p>How I can remove just one element from the list for example only <code>A0002</code>?</p>
