<<<<<<< HEAD Generics 3 ======= Generics Checkpoint 1 >>>>>>> a73ca3e642df4e32531b17bca5cb7a0d33b0c081 <<<<<<< HEAD

The use of a generic data type is preferred over using Object as a general class in a collection because...

It ensures that all the members of the collection are objects related by inheritance.
  • It allows the data type to be determined later by the client of the class.
  • It can contain objects of type OrderedPair.
  • =======

    Consider a generic method declared as depicted below, with type parameter <T extends Number> and two method parameters both of type T:

    public  void specialMethod(T first, T second)
    

    Which of the following is correct?

    client code can only provide type Number or any subclass of Number for the type parameter for T
    • client code can provide any value for the type parameter T
    • None of these answers are correct
    • >>>>>>> a73ca3e642df4e32531b17bca5cb7a0d33b0c081

    There are no hints for this question