Compiler Error J0106

Class 'identifier' has a circular dependency

The compiler detected two or more classes directly or indirectly attempting to subclass each other. This error usually occurs when two classes extend each other. One class should act as the base class of the other.

The following example illustrates this error:

public class Simple extends Simple2 {
   
   // error: extending ‘Simple2’
}

class Simple2 extends Simple {
   
   // error: also extending ‘Simple’
}