Multiple Choice
Consider the following code snippet in the LinkedList<E> class: public void addAll(LinkedList<? extends E> other)
{
ListIterator<E> iter = other.listIterator() ;
While (iter.hasNext() )
{
Add(iter.next() ) ;
}
}
Which of the following statements about this code is correct?
A) You must supply a specific type for the element type of other.
B) For the element type of other, you must supply a type that is a subtype of E.
C) For the element type of other, you must supply a type that is a supertype of E.
D) For the element type of other, you must supply a type that is either a subtype or a supertype of E.
Correct Answer:

Verified
Correct Answer:
Verified
Q13: An inner helper class, such as a
Q14: Consider the following code snippet: public class
Q15: Consider the following code snippet: public static
Q16: Consider the following code snippet: public static
Q17: Which of the following satisfies the wildcard
Q19: What is the best technique for overcoming
Q20: Which of the following satisfies the wildcard
Q21: What does it mean when the syntax
Q22: Consider the following code snippet: ArrayList<Coin> coins1
Q23: Generics limit Java code somewhat. Which of