The indicated error is clearly related to the @Override annotation. When checking annotations (which, I believe, should happen at the very early stage of the compilation process), type deletion did not happen. Thus, the types of List are not the same as List, and you get a warning. But even without this annotation, I get an error message
name clash: getname(java.util.List<java.lang.Integer>) in child and getname(java.util.List<java.lang.String>) in parent have the same erasure, yet neither overrides the other class child extends parent{`.
This error clearly states that they have the same erasure, but still none of them pass. Therefore, Java, in principle, does not allow this. I can understand that this will lead to a lot of problems / embarrassment, if that is permissible. E.g. if someone calls new Child().get_name( new List<String> () ) , he cannot be allowed for the Child method, which violates the concept of riding. Therefore, it is right that it is prohibited.
Jackdvd
source share