why this code does not execute
import java.io.*;
class copyfile
{
public static void main(String args[])throws IOException
{
int i;
FileInputStream fin;
FileOutputStream fout;
try
{
fin=new FileInputStream(args[0]);
}
catch(FileNotFoundException e)
{
System.out.println("Input file not found");
return;
}
//open output file
try
{
fout=new FileOutputStream(args[1]);
}
catch(FileNotFoundException e)
{
System.out.println("Erroe opening output file");
return;
}
}
catch(ArrayIndexOutOfBoundsException e)
{
System.out.println("Usage:copyfile from to");
return;
}
//copy file
try
{
do
{
i=fin.read();
if(i!=-1)
fout.write(i);
}
while(i!=-1);
}
catch(IOException e)
{
System.out.println("file error");
}
fis.close();
fout.close();
}
}