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.

