I am new to java language. I was reading about Generics, and came across a question.
class XXX<E extends Shape> {
}
//This class compiles , but
class XXXX<E super Shape>{
}
//This do not compile.
My question is, while defining a generic class, extends is allowed but why super is not allowed?
I been through few Generics question on stackoverflow, none answers the above question.