2 errors

<b>here is my code the compiler errors are listed at the bottom</b>

import java.io.*;

class filecopier{

//this program copies text from one file to another

//the file names are read as command line arguments

publicstaticvoid main(String args[]){

String f1n=arg[0];

String f2n=arg[1];

try{

DataInput f1 =new DataInputStream(new FileInputStream(f1n));

DataOutput f2 =new DataOutputStream(new

FileOutputStream(f2n));

String x =f1.readLine();

while (x!=null){

f2.writeBytes(x+"\r\n");

x=f1.readLine();

}//end while

}catch (Exception ex){String err=ex.toString();

System.out.println(err);}

}

}

<b>Here are the 2 compiler errors. I can't figure out whats wrong.</b>

C:\filecopier.java:8: cannot resolve symbol

symbol : variable arg

location: class filecopier

String f1n=arg[0];

^

C:\filecopier.java:9: cannot resolve symbol

symbol : variable arg

location: class filecopier

String f2n=arg[1];

^

2 errors

Process completed.

[1968 byte] By [dannyd73] at [2007-9-30 22:03:40]
# 1
You've named the String array argument to main "args", but in your code you refer to it as "arg".
paulcw at 2007-7-7 11:16:43 > top of Java-index,Archived Forums,Debugging Tools and Techniques...
# 2
thanks
dannyd73 at 2007-7-7 11:16:43 > top of Java-index,Archived Forums,Debugging Tools and Techniques...