Compiler Error J0115

Cannot call constructor recursively (directly or indirectly)

The compiler detected a recursive constructor call. This error usually occurs when a constructor has a call to the same constructor. This error can also occur if one constructor calls a second constructor and the second constructor has a call back to the first constructor.

The following example illustrates this error:

public class Simple {
   
   Simple (int arg1) {
   
      this(1);
      // error: constructor calling itself
   }
}