首页 > 试题广场 >

为了向文件hello.txt尾加数据,下列哪个是正确创建指向

[单选题]
为了向文件hello.txt尾加数据,下列哪个是正确创建指向hello.txt的流?
  • try{OutputStream out = new FileOutputStream("hello.txt");} catch(IOException e){}
  • try{OutputStream out = new FileOutputStream("hello.txt",true);} catch(IOException e){}
  • try{OutputStream out = new FileOutputStream("hello.txt",false);} catch(IOException e){}
  • try{OutputStream out = new OutputStream("hello.txt",true);} catch(IOException e){}

这道题你会答吗?花几分钟告诉大家答案吧!