可学答题网 > 问答 > OCJP(310-065)题库
目录: 标题| 题干| 答案| 搜索| 相关
问题

Given a pre-generics i


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) {".
  • DReplace line 13 with "for (Iterator iter : intList) {".
  • EReplace the method declaration with "sum(List intList)".
参考答案
参考解析:
分类:OCJP(310-065)题库
相关推荐

1、若a=5,b=3,c=4,逻辑表达式!(a+b)&;&;!c的值

若a=5,b=3,c=4,逻辑表达式!(a+b)&;&;!c的值为()A0B-1C1D2

2、Given a header in&ensp

Given a header in an HTTP request:X-Retries:4Which two retrieve the value of the header from&...

3、Given in a single&ensp

Given&ensp;in&ensp;a&ensp;single&ensp;JSP&ensp;page:<%@&ensp;taglib&ensp;prefix=&rsquo;java&rsquo;&ensp;uri=&rsquo;myTags&rsquo;&ensp;%><%@&ensp;taglib&ensp;prefix=...

4、Given: When line 14 i

Given:When line 14 is reached, how many objects are eligible for the garbage collector?()A0B1C2D3E4

5、Given: When line 15 i

Given:When line 15 is reached, how many objects are eligible for the garbage collector?()A0B1C2D3E4

6、Given:  Which code, i

Given:&ensp;Which&ensp;code,&ensp;inserted&ensp;at&ensp;line&ensp;15,&ensp;creates&ensp;an&ensp;instance&ensp;of&ensp;the&ensp;Point&ensp;class&ensp;defined&ensp;...