"基本程式語言 01" 修訂間的差異

出自 陳富國維基館
前往: 導覽, 搜尋
 
行 4: 行 4:
 
<br><pre>
 
<br><pre>
 
下 列 片 斷 程 式 執 行。
 
下 列 片 斷 程 式 執 行。
−
 
−
QUESTION 1
 
−
import java.io.^.;
 
−
public class Forest implements Serializable{
 
−
private static viod main (String[] args0{
 
−
Forest f= new Dorest();
 
−
try{
 
−
  FileOutputStream fs= new FileOutputStream("Forest.Ser");
 
−
  ObjertOutputStream OS =newFileOutputStream(fs);
 
−
  os.writeObject(f);    OS.Class();
 
−
  }Catch(Exception ex){ex.PreintStackTreace();}
 
−
   
 
−
    .
 
−
    class Tree{}
 
−
Given the code in the exhibit. What is the result?
 
−
A. Compilation fails
 
−
B. An exception is thrown at runtime.
 
−
C. An instance of Forest is serialized.
 
−
D. An instance of Forest and an instance of Tree are both serialized.
 
  
 
</pre>
 
</pre>
行 30: 行 11:
 
----
 
----
 
<div class="mw-collapsible-content">
 
<div class="mw-collapsible-content">
−
<span style="font-size: medium;">Ans: B </span>
+
<span style="font-size: medium;">Ans: </span>
  
 
<span style="font-size:medium;"> 解說:
 
<span style="font-size:medium;"> 解說:

於 2013年4月10日 (三) 10:07 的最新修訂


下 列 片 斷 程 式 執 行。

解答


Ans:

解說:


類似題型


題目

解說:


程式觀念考題
基本程式語言 決策程式語法 迴圈/重複敘述 副程式呼叫與遞迴 物件導向-類別與物件 其他

01 . 02 . 03 . 04 . 05
06 . 07 . 08 . 09 . 10
11 . 12 . 13 . 14 . 15

01 . 02 . 03 . 04 . 05
06 . 07 . 08 . 09 . 10
11 . 12 . 13 . 14 . 15

01 . 02 . 03 . 04 . 05
06 . 07 . 08 . 09 . 10
11 . 12 . 13 . 14 . 15

01 . 02 . 03 . 04 . 05
06 . 07 . 08 . 09 . 10
11 . 12 . 13 . 14 . 15

01 . 02 . 03 . 04 . 05
06 . 07 . 08 . 09 . 10
11 . 12 . 13 . 14 . 15

01 . 02 . 03 . 04 . 05
06 . 07 . 08 . 09 . 10
11 . 12 . 13 . 14 . 15