Java interface question
<p>I have 2 classes</p>

<ul>
<li>classCurvePath</li>
<li>classLinearPath</li>
</ul>

<p>In these classes I have an <strong>items</strong> ArrayList. </p>

<p>How can I call a method like:</p>

<pre><code>...
    if (i==1) method(classCurvePath);
    if (i==2) method(classLinearPath);

..    
    void method(Object class) {

    ArrayList al = class.items;

    }
</code></pre>

<p>Do I need an interface?  How can I do this?  This is not working: "cannot be resolved or not a field"</p>
