多选题Given a pre-generics implementation of a method: What three changes allow the class to be used with generics and avoid an unchecked warning?()ARemove line 14.BReplace line 14 with "int i = iter.next();".CReplace line 13 with "for (int i : intList) {".
题目
多选题
Given a pre-generics implementation of a method: What three changes allow the class to be used with generics and avoid an unchecked warning?()
BReplace line 14 with "int i = iter.next();".
CReplace line 13 with "for (int i : intList) {".
DReplace line 13 with "for (Iterator iter : intList) {".
EReplace the method declaration with "sum(List intList)".
相似考题