Solved

Suppose a Linked-List Class with a Generic E Type Has

Question 30

Multiple Choice

Suppose a linked-list class with a generic E type has been constructed with a java.awt.Component type variable. Consider its instance method locate with the following header: public void locate(MyLinkedList<? extends E>) { . . . }
Which type cannot be passed to method locate?
I MyLinkedList<JButton>
II MyLinkedList<Component>
III MyLinkedList<JTextField>


A) I
B) I and II
C) II and III
D) all can be passed to locate

Correct Answer:

verifed

Verified

Unlock this answer now
Get Access to more Verified Answers free of charge

Related Questions