<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="zh-TW">
		<id>https://fgchen.com/wiki/index.php?action=history&amp;feed=atom&amp;title=SCJP_1.6%E7%89%88%E8%80%83%E9%A1%8C_188</id>
		<title>SCJP 1.6版考題 188 - 修訂歷史</title>
		<link rel="self" type="application/atom+xml" href="https://fgchen.com/wiki/index.php?action=history&amp;feed=atom&amp;title=SCJP_1.6%E7%89%88%E8%80%83%E9%A1%8C_188"/>
		<link rel="alternate" type="text/html" href="https://fgchen.com/wiki/index.php?title=SCJP_1.6%E7%89%88%E8%80%83%E9%A1%8C_188&amp;action=history"/>
		<updated>2026-05-30T01:04:20Z</updated>
		<subtitle>本 Wiki 上此頁面的修訂歷史</subtitle>
		<generator>MediaWiki 1.29.0</generator>

	<entry>
		<id>https://fgchen.com/wiki/index.php?title=SCJP_1.6%E7%89%88%E8%80%83%E9%A1%8C_188&amp;diff=1224&amp;oldid=prev</id>
		<title>Ikk：新頁面:  Given a pre-generics implementation of a method:  11. public static int sum(List list){  12.   int sum = 0;  13.   for(Iterator iter = list.iterator(); iter.hasNext();){  14.     int ...</title>
		<link rel="alternate" type="text/html" href="https://fgchen.com/wiki/index.php?title=SCJP_1.6%E7%89%88%E8%80%83%E9%A1%8C_188&amp;diff=1224&amp;oldid=prev"/>
				<updated>2013-03-30T00:27:12Z</updated>
		
		<summary type="html">&lt;p&gt;新頁面:  Given a pre-generics implementation of a method:  11. public static int sum(List list){  12.   int sum = 0;  13.   for(Iterator iter = list.iterator(); iter.hasNext();){  14.     int ...&lt;/p&gt;
&lt;p&gt;&lt;b&gt;新頁面&lt;/b&gt;&lt;/p&gt;&lt;div&gt; Given a pre-generics implementation of a method:&lt;br /&gt;
 11. public static int sum(List list){&lt;br /&gt;
 12.   int sum = 0;&lt;br /&gt;
 13.   for(Iterator iter = list.iterator(); iter.hasNext();){&lt;br /&gt;
 14.     int i = ((Integer)iter.next()).intValue();&lt;br /&gt;
 15.   sum += i;&lt;br /&gt;
 16.   }&lt;br /&gt;
 17.   return sum;&lt;br /&gt;
 18. }&lt;br /&gt;
 &lt;br /&gt;
 What three changes allow the class to be used with generics and avoid an unchecked warning? (Choose three.)&lt;br /&gt;
  A. Remove line 14.&lt;br /&gt;
  B. Replace line 14 with &amp;quot;int i = iter.next();&amp;quot;.&lt;br /&gt;
  C. Replace line 13 with &amp;quot;for(int i : intList){&amp;quot;.&lt;br /&gt;
  D. Replace line 13 with &amp;quot;for(Iterator iter : intList){&amp;quot;.&lt;br /&gt;
  E. Replace the method declaration with &amp;quot;sum(List&amp;lt;int&amp;gt; intList)&amp;quot;.&lt;br /&gt;
  F. Replace the method declaration with &amp;quot;sum(List&amp;lt;Integer&amp;gt; intList)&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;toccolours mw-collapsible mw-collapsed&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;span style=&amp;quot;font-size:medium;&amp;quot;&amp;gt;解答&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&amp;lt;div class=&amp;quot;mw-collapsible-content&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;span style=&amp;quot;font-size: medium;&amp;quot;&amp;gt;Ans: A C F   &amp;lt;/span&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;span style=&amp;quot;font-size:medium;&amp;quot;&amp;gt; 解說:&lt;br /&gt;
那三項改變可以使用這個類別以泛型的方式來使用，並且可以避免unchecked 的警告？&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/span&amp;gt;	&lt;br /&gt;
&amp;lt;/div&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
{{SCJP 1.6版考題講解}}&lt;/div&gt;</summary>
		<author><name>Ikk</name></author>	</entry>

	</feed>