单选题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 extends String list) {D change the method signature on line 11 to: public void addStrings(List super String list) {E No changes are necessary. This method compiles without warnings.
单选题
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
B
change lines 12 and 13 to: list.add
C
change the method signature on line 11 to: public void addStrings(List< extends String> list) {
D
change the method signature on line 11 to: public void addStrings(List< super String> list) {
E
No changes are necessary. This method compiles without warnings.
参考解析
解析:
暂无解析
相关考题:
单选题Your database is using shared server configuration. Which optional memory structure would you configure to store the User Global Area (UGA) information and improve the shared pool performance?()Alarge poolBstreams poolCkeep buffer cacheDrecycle buffer cache
单选题根据特定数据源生成的,可以动态改变其版面布局的交互式汇总表格是().A数据透视表B数据的筛选C数据的排序D数据的分类汇总