Let Point< T > be a generic type.We want to write a method that takes as parameter Point objects whose type parameter is the Number class,or any subclass of Number.We can do this by declaring the type of the method parameter as
A) Point< Number >
B) Point< ? super Number >
C) Point< ? extends Number >
D) Point< ? sub Number >
Correct Answer:
Verified
Q5: Constraining a type parameter in a generic
Q6: In a generic method,a type parameter is
Q7: A generic class
A) can only extend a
Q8: An advantage of using generic types is
A)
Q9: The declaration
ArrayList< int > aL = new
Q11: A class is generic
A) if it is
Q12: The automatic conversion of a wrapper type
Q13: When a generic class is instantiated without
Q14: Consider a method of the form
Void printPoint(Point<
Q15: One of the advantages of using generics
Unlock this Answer For Free Now!
View this answer and more for free by performing one of the following actions
Scan the QR code to install the App and get 2 free unlocks
Unlock quizzes for free by uploading documents