I'm quiet new into generics in java. I have an Interface called RIEngine
.
I was trying following example:
private <T> boolean allExist(List<T extends RIEngine> resultedList,
String... columnName)
{ ... }
doesn't compile.
But
private <T> boolean allExist(List<? extends RIEngine> resultedList,
String... columnName)
{ ... }
compiles.
My question is: why is this so.
Why can't I use type = "T" instead of wild card?
Please help me to understand.