This is driving me crazy. As it stands below the compiler complains that the method invocation is unchecked. If I add a type parameter getMax(Collection<Num> c) the compiler moans that it canno't find symbol method max(java.util.Collection<Num>).
The method prototype simply suggests that any type can be passed in that extends the type that the Collection is marked to hold.Code:public static Num getMax(Collection c){ return Collections.max(c); }![]()
Code:public static <T extends Object & Comparable<? super T>> T max(Collection<? extends T> coll)


Reply With Quote
CornedBee
Thanks for the help. 
