有人可以向我解释原因
@Override
public void fooMethod(Class<?> c)
Run Code Online (Sandbox Code Playgroud)
不会覆盖
public void fooMethod(Class c)
Run Code Online (Sandbox Code Playgroud)
并给我以下错误:
- Name clash: The method fooMethod(Class<?>) of type SubClass has the same erasure as fooMethod(Class) of type SuperClass but does not override it - The method fooMethod(Class<?>) of type SubClass must override a superclass method
?
编辑: " java -version"Java(TM)2 Runtime Environment,Standard Edition(build 1.5.0_16-b06-284).至于代码片段,它已经在上面,几乎; 以上扩展了以下内容.