How do I store an object in ArrayList?
<p>I'm trying to store an object person in an ArrayList.</p>

<p>I have an <code>ArrayList&lt;String&gt; customer = new ArrayList&lt;String&gt;();</code></p>

<p>The object 'person' has two variables: name (String) and pNr (long).
I have tried to simply add it: <code>customer.add(person)</code> but that doesn't seem to work.</p>

<p>To clarify: I don't want to store the variables individually. I want to store the entire object person in the ArrayList.</p>

<p>I simply can't figure out how to engage this problem or even if it can be done.</p>

<p>Can someone point me in the right direction?</p>
