Java ArrayList adding an element
<p>Why does this line of code in my Tree class not work. I get an error on the add(child).</p>

<pre><code>    public void addChild(TreeNode&lt;T&gt; parent, TreeNode&lt;T&gt; child)
{
    parent.children.add(child);
}
</code></pre>

<p>Here is TreeNode</p>

<pre><code>public class TreeNode&lt;E&gt; {

protected int accountNum;
protected ArrayList&lt;E&gt; children;
</code></pre>
