I'm getting an error here that says I haven't defined a method, but it is right in the code.
class SubClass<E> extends ExampleClass<E>{
Comparator<? super E> c;
E x0;
SubClass (Comparator<? super E> b, E y){
this.c = b;
this.x0 = y;
}
ExampleClass<E> addMethod(E x){
if(c.compare(x, x0) < 0)
return new OtherSubClassExtendsExampleClass(c, x0, SubClass(c, x));
//this is where I get the error ^^^^^^
}
I did define that Constructor for SubClass, why is it saying that I didn't when I try to pass it in that return statement?