How to add a value to arraylist in android?
<p>I am <strong>adding a value to my arraylist</strong> but it is showing error. Before adding the value I am displaying it first. The value is displaying but it is not adding to the arraylist. Please help me regarding this...</p>

<p>My Code:</p>

<pre><code>static ArrayList&lt;String&gt; allfirstids;

ArrayList&lt;String&gt; list = List.get(i);
UserBO user = new UserBO();

user.firstid = Integer.parseInt(list.get(0));
user.secondid = Integer.parseInt(list.get(1));
System.out.print("Hello this is first id");
System.out.print(list.get(0));

allfirstids.add(list.get(0));
System.out.println("first ids"+allfirstids);
</code></pre>

<p>Thanks in advance...</p>
