首页 › 答案 › 题库 › 超星尔雅学习通未分类

为了向hello.txt尾加数据,下列哪一项能够正确创建指向hello.txt的流?

为了向hello.txt尾加数据,下列哪一项能够正确创建指向hello.txt的流?
A.try{OutputStreamout=newFileOutputStream(“hello.txt”);}Catch(IOExceptione){}
B.try{OutputStreamout=newFileOutputStream(“hello.txt”,true);}Catch(IOExceptione){}
C.try{OutputStreamout=newFileOutputStream(“hello.txt”,false);}Catch(IOExceptione){}
D.try{OutputStreamout=newOutputStream(“hello.txt”,true);}Catch(IOExceptione){}
正确答案:B