title: implementing a interface to a class: class to interface to interface
body: <p>hi im a beginner in this and im trying to implement a class to a interface. The interface extends another interface. Im making a class with methods to run through a list and interfer with it, the two interfaces are apart of this.</p>
  
  <p>The two interfaces are in each its separate file, but everything is in the same package, hope this is right.</p>
  
  <p>Im getting the following errors:</p>
  
  <p>From the class doublelinkedlist: <code>interface expected here</code></p>
  
  <p>From the interface A: <code>doublelinkedlist.A is already defined in doublelinkedlist, interface expected here</code></p>
  
  <p>From interface B: <code>doublelinkedlist.B is already defined in doublelinkedlist</code></p>
  
  <p>Code class:</p>
  
  <pre><code>package doublelinkedlist;
  
  import java.util.*;
  
  public class Doublelinkedlist&lt;T&gt; implements A&lt;T&gt;
  {
  </code></pre>
  
  <p>Code interface A: (in separate file called A.java )</p>
  
  <pre><code>package doublelinkedlist;
  
  import java.util.Iterator;
  
  
  public class A&lt;T&gt; { // am I supposed to have a class here? or just have the interface?
  
    public interface A&lt;T&gt; extends B&lt;T&gt; 
    {
  </code></pre>
  
  <p>Code interface B: (in separate file called B.java )</p>
  
  <pre><code>package doublelinkedlist;
  
  public class B&lt;T&gt; {
  
    public interface B&lt;T&gt; extends Iterable&lt;T&gt; 
    {
  </code></pre>
  
  <p>There is no code for the two interfaces in the class, so I dont understand why i get an error saying its already defined. Anybody got a clue?</p>