問題詳情
188

What three changes allow the class to be used with generics and avoid an unchecked warning? (Choosethree.) 1. Remove line 14. 2. Replace line 14 with "int i = iter.next();". 3. Replace line 13 with "for(int i : intList){". 4. Replace line 13 with "for(Iterator iter : intList){". 5. Replace the method declaration with "sum(List<int> intList)". 6. Replace the method declaration with "sum(List<Integer> intList)".
(A) 123
(B) 246
(C) 136
(D) 456
參考答案