File operation in java


import java.io.*;

class CopyFile
{
public static void main(String args[])
{
FileInputStream A=null;
FileOutputStream B=null;
int b;
try
{
A=new FileInputStream("a.txt");
B = new FileOutputStream("b.txt");
while((b=A.read())!=-1)
{
B.write(b);
}
A.close();
B.close();
System.out.println("File copied successfully");
}
catch(IOException e)
{
System.out.println("file not found");
}
}
}

We Are Founder..