I am writing a generic class and used the following code:
public class MyClass<P>{
}
I am getting a warning "The type parameter P is hiding the type P" . what does that mean?
I am writing a generic class and used the following code:
public class MyClass<P>{
}
I am getting a warning "The type parameter P is hiding the type P" . what does that mean?
There should be a class (or inner class or outer type parameter (thanks Andy)) inaptly named P
on your classpath. To find it, first change to this:
public class MyClass {
P p;
}
Then Ctrl-click P
in your IDE (or whatever shortcut takes you to the declaration of an identifier). If that doesn't work, try auto-import to see which import appears at the top.