Given:
3. import java.util.*;
4. public class Hancock {
5. // insert code here
6. list.add(“foo”);
7. }
8. }
Which two code fragments, inserted independently at line 5, will compile without warnings?
(Choose two.)
A.
public void addStrings(List list) {
B.
public void addStrings(List<String> list) {
C.
public void addStrings(List<? super String> list) {
D.
public void addStrings(List<? extends String> list) {