public class Test {
class Genric<C extends Clazz> {
C[] s;
public Genric() {
this.s = new SubClazz[3];
}
}
class Clazz {
}
class SubClazz extends Clazz {
}
}
The code gives an error at this.s = new SubClazz[3];
saying Type mismatch: cannot convert from Test.Clazz[] to C[]
. Why does this error occur? How to solve this problem?