42、(读写文件)下列代码实现了将一个文件的内容复制到另一个文件的功能。下划线处应填入的代码是________。 import java .io .* ; public class Test{ public static void main (String [ ] args ) { try{ FileInputStream is = new FileInputStream(“D :\\from .txt”) ; FileOutputStream os = new ____________(“D : \\ to .txt”) ; byte [ ] str = new _______ [1024] ; while (is .available () > 0 ) { is. read (str ,0 , 1024) ; os .write(str) ; } is.close () ; os.close () ; } catch (ArrayIndexOutOfBoundsEx

A.FileInputStream, str B.FileOutputStream ,str C.FileOutputStream, byte D.FileInputStream,byte

时间:2023-12-25 15:14:45

相似题目

推荐题目