为了向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


Tag:面向对象程序设计 数据 时间:2022-04-16 13:32:22