Java Reference
In-Depth Information
6. NoȌthe method has no type parameters. It is an ordinary method in a
generic class.
7. public class BinarySearchTree<E extends Comparable>
8. public static <E extends Measurable > E min(E[] a)
{
E smallest = a[0];
for (int i = 1; i < a.length; i++)
if (a[i].getMeasure() <
smallest.getMeasure())
smallest = a[i];
return smallest;
}
9. public static void print(Object[] a)
{
for (Object e : a)
System.out.print(e + Ð Ñ);
System.out.println();
}
10. The LinkedList class of Chapter 15 .
785
Search WWH ::




Custom Search