11. public void addStrings(List list) { 12. list.add(”foo”); 13. list.add(”bar”); 14. } What must you change in this method to compile without warnings?()
A. add this code after line 11: list = (List) list;
B. change lines 12 and 13 to: list.add(”foo”); list.add(”bar”);
C. change the method signature on line 11 to: public void addStrings(List list) {
D. change the method signature on line 11 to: public void addStrings(List list) {
E. No changes are necessary. This method compiles without warnings.
查看答案
该试题由用户694****62提供
查看答案人数:32965
如遇到问题请
联系客服
正确答案
该试题由用户694****62提供
查看答案人数:32966
如遇到问题请联系客服