Rec 04
Problems
01. Generic Type parameter and static field
static field02. Variance Relationship about Generics and Wildcards
03. Type Inference and the Application of Wildcards
static <T extends Comparable<T>> T max (List<T>, list) {
T max = list.get(0);
if (list.get(1).compareTo(max)) > 0) {
return list.get(1);
}
return max;
}Explanation using PECS
1
2
Tips
Last updated