35.有一 File 類別物件 f,它將以方法 exists 檢查該檔案是否存在,下列 JAVA 程式碼何者最適宜?
(A) Exception e= new IOException( “File not found!”); if (!f.exists()) throw e;
(B) if (!f.exists()) throw “File not found!”);
(C) if (!f.exists()) throw new IOException ();
(D) if (!f.exists()) throw new IOException ( “File ” +f.getName()+ “not found!”)

答案:登入後查看
統計: A(1), B(1), C(0), D(10), E(0) #3307197

詳解 (共 1 筆)

#6888440
題目解析 這道題目考察的是 Java ...
(共 1296 字,隱藏中)
前往觀看
0
0