(读写文件)下列代码实现了将一个文件的内容复制到另一个文件的功能。下划线处应填入的代码是_____
已帮助 人
(读写文件)下列代码实现了将一个文件的内容复制到另一个文件的功能。下划线处应填入的代码是________。 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 (ArrayIndexOutOfBoundsException
A.FileInputStream, str
B.FileOutputStream ,str
C.FileOutputStream, byte
D.FileInputStream,byte

回答
共1条回复-
A
