What can I do to be able to use Getter and Setter meths with ArrayList
<p>I'd like to use getter and setter methods I wrote in my Nation class with <code>ArrayList</code>, but it doesn't work. <code>ArrayList</code> doesn't behave like an array.</p>

<p>The following code doesn't work:</p>

<p>list[i].getCapitol(); </p>

<p>I found a way around it, but I need to use arrays.  I think the teacher wants me to only use <code>ArrayList</code>.</p>

<pre><code>public string getCapitol()
{
    return capitol;
} 
</code></pre>
