为了向文件hello.txt尾加数据,下列哪个是正确创建指向hello.txt的流?
选项:
A: try { OutputStream out = new FileOutputStream ("hello.txt"); } catch(IOException e){}
B: try { OutputStream out = new FileOutputStream ("hello.txt",true); } catch(IOException e){}
C: try { OutputStream out = new FileOutputStream ("hello.txt",false); } catch(IOException e){}
D: try { OutputStream out = new OutputStream ("hello.txt",true); } catch(IOException e){}
发布时间:2024-05-12 22:26:57