Now, I have two classes both using generics:
The first is:
And the second is:
Now, when attempting to compile I get this error:
Lion.java:1: name clash: setName(T) in Lion<T> and setName(T) in Animal have the same erasure, yet neither overrides the other
public class Lion<T extends
String> extends Animal{
^
1 error
Huh? Isn't it obvious that the method in "Lion" overrides "Animal." (Yes, I tried adding the @Override notation. It didn't work.)