<?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_056</id>
		<title>SCJP 1.6版考題 056 - 修訂歷史</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_056"/>
		<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_056&amp;action=history"/>
		<updated>2026-04-27T06:58:28Z</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_056&amp;diff=1368&amp;oldid=prev</id>
		<title>Ikk：新頁面:  5. class Building{}  6. public class Barn extends Building{  7.   public static void main(String[] args){  8.     Building build1 = new Building();  9.     Barn barn1 = new Barn();  1...</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_056&amp;diff=1368&amp;oldid=prev"/>
				<updated>2013-03-30T07:10:57Z</updated>
		
		<summary type="html">&lt;p&gt;新頁面:  5. class Building{}  6. public class Barn extends Building{  7.   public static void main(String[] args){  8.     Building build1 = new Building();  9.     Barn barn1 = new Barn();  1...&lt;/p&gt;
&lt;p&gt;&lt;b&gt;新頁面&lt;/b&gt;&lt;/p&gt;&lt;div&gt; 5. class Building{}&lt;br /&gt;
 6. public class Barn extends Building{&lt;br /&gt;
 7.   public static void main(String[] args){&lt;br /&gt;
 8.     Building build1 = new Building();&lt;br /&gt;
 9.     Barn barn1 = new Barn();&lt;br /&gt;
 10.   Barn barn2 = (Barn)build1;&lt;br /&gt;
 11.   Object obj1 = (Object)build1;&lt;br /&gt;
 12.   String str1 = (String)build1;&lt;br /&gt;
 13.   Building build2 = (Building)barn1;&lt;br /&gt;
 14.   }&lt;br /&gt;
 15. }&lt;br /&gt;
 &lt;br /&gt;
 &lt;br /&gt;
 Which is true?&lt;br /&gt;
   A. if line 10 is removed, the compilation succeeds.&lt;br /&gt;
   B. if line 11 is removed, the compilation succeeds.&lt;br /&gt;
   C. if line 12 is removed, the compilation succeeds.&lt;br /&gt;
   D. if line 13 is removed, the compilation succeeds.&lt;br /&gt;
   E. More than one line must be removed for compilation to succeed.&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: C   &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;
 只有繼承關係可以進行casting(轉換型態)。&lt;br /&gt;
 Build1是Building型態，和String型態沒有繼承關係&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>