At Line 2, I tried
class SubABS<K> extends ABS<K>,
class SubABS<K extends Number> extends ABS<K extends Number> and all variations of this, finally it compiles with class SubABS extends ABS, and the warning that raw types are used.
When I use Eclipse to implement the unimplemented methods, I get the method on 3. When I used the exact signature in 1, I get an error
Multiple markers at this line
- Name clash: The method useMe(ABS<? extends K>) of type SubABS has the same erasure as useMe(ABS) of type
ABS but does not override it
- The method useMe(ABS<? extends K>) of type SubABS must override a superclass method
How can I extend this abstract method correctly using Generics and why am I getting the above issues?