多选题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?()
A

Remove line 14.

B

Replace line 14 with "int i = iter.next();".

C

Replace line 13 with "for (int i : intList) {".

D

Replace line 13 with "for (Iterator iter : intList) {".

E

Replace the method declaration with "sum(List  intList)".


相似考题
参考答案和解析
正确答案: B,C
解析: 暂无解析