Came across this example in Java Complete Reference under Generics method.
static <T extends Comparable<T>, V extends T> boolean isIn(T x, V[] y) {
for(int i=0; i < y.length; i++)
if(x.equals(y[i])) return true;
return false;
}
Here V extends T is confusing. Can we only have <T extends Comparable<T>> to get the job done. Because T extends some type which means the type and its sub type. Then why we need V extends T?. Is there any special case for using <T extends Comparable<T>, V extends T>?