CopyFile.mainでjava.lang.ArrayIndexOutOfBoundsException:0が発生するのはなぜですか
//Copy one file Data to another File
import java.io.*;
class CopyFile{
public static void main(String[] args)throws IOException{
FileInputStream fis=new FileInputStream(args[0]);//reading File
FileOutputStream fos=new FileOutputStream(args[1]);//reading File
int data;
while((data=fis.read())!=-1){
fos.write(data);
/*here using while loop to copy data from one file and storing it in another file*/
}
}
}