<?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_095</id>
		<title>SCJP 1.6版考題 095 - 修訂歷史</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_095"/>
		<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_095&amp;action=history"/>
		<updated>2026-04-13T14:07:42Z</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_095&amp;diff=1325&amp;oldid=prev</id>
		<title>Ikk：新頁面:  1. interface TestA{String toString();}  2. public class Test{  3.   public static void main(String[] args){  4.     System.out.println(new TestA(){  5.        public String toString()...</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_095&amp;diff=1325&amp;oldid=prev"/>
				<updated>2013-03-30T05:52:19Z</updated>
		
		<summary type="html">&lt;p&gt;新頁面:  1. interface TestA{String toString();}  2. public class Test{  3.   public static void main(String[] args){  4.     System.out.println(new TestA(){  5.        public String toString()...&lt;/p&gt;
&lt;p&gt;&lt;b&gt;新頁面&lt;/b&gt;&lt;/p&gt;&lt;div&gt; 1. interface TestA{String toString();}&lt;br /&gt;
 2. public class Test{&lt;br /&gt;
 3.   public static void main(String[] args){&lt;br /&gt;
 4.     System.out.println(new TestA(){&lt;br /&gt;
 5.        public String toString(){return &amp;quot;test&amp;quot;;}&lt;br /&gt;
 6.     });&lt;br /&gt;
 7.   }&lt;br /&gt;
 8. }&lt;br /&gt;
 &lt;br /&gt;
 &lt;br /&gt;
 What is the result?&lt;br /&gt;
   A. test&lt;br /&gt;
   B. null&lt;br /&gt;
   C. An exception is thrown at runtime.&lt;br /&gt;
   D. Compilation fails because of an error in line 1.&lt;br /&gt;
   E. Compilation fails because of an error in line 4.&lt;br /&gt;
   F. Compilation fails because of an error in line 5.&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   &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;
 new TestA(){&lt;br /&gt;
     public String toString(){return &amp;quot;test&amp;quot;;}&lt;br /&gt;
 }&lt;br /&gt;
 此種寫法是建立物件時，立即提供介面方法toString的實作。&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>