单项选择题
为了向文件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){}