No, generics cannot have a primitive type as the generic type parameter; it must be a reference type, such as Integer
.
Additionally, you are declaring a generic type parameter Integer
that is now hiding the actual java.lang.Integer
class. If MyClass
wasn't itself meant to be generic, then remove it from the class:
public class MyClass extends AnotherOne<Integer>
If it was, use a single capital letter for the generic type parameter:
public class MyClass<T> extends AnotherOne<T>