题目内容

Which method implementations will write the given string to a file named "file", using UTF8 encoding?() IMPLEMENTATION a: public void write(String msg) throws IOException { FileWriter fw = new FileWriter(new File("file")); fw.write(msg); fw.close(); } IMPLEMENTATION b: public void write(String msg) throws IOException { OutputStreamWriter osw = new OutputStreamWriter(new FileOutputStream("file"), "UTF8"); osw.write(msg); osw.close(); } IMPLEMENTATION c: public void write(String msg) throws IOException { FileWriter fw = new FileWriter(new File("file")); fw.setEncoding("UTF8"); fw.write(msg); fw.close(); } IMPLEMENTATION d: public void write(String msg) throws IOException { FilterWriter fw = FilterWriter(new FileWriter("file"), "UTF8"); fw.write(msg); fw.close(); } IMPLEMENTATION e: public void write(String msg) throws IOException { OutputStreamWriter osw = new OutputStreamWriter( new OutputStream(new File("file")), "UTF8" ); osw.write(msg); osw.close(); }

A. Implementation a.
B. Implementation b.
C. Implementation c.
D. Implementation d.
E. Implementation e.

查看答案
更多问题

甲烷在空气中的爆炸范围下限为()%。

A. 5.3;
B. 14;
C. 75;
D. 95。

DNS区域类型有三种,下面哪个不是DNS区域类型?()

A. 集成的Active Directory
B. 标准搜索区域
C. 标准主要区域
D. 标准辅助区域

古典主义文学的特点?

简要介绍格式塔学派。

答案查题题库