Simple copy one file to another file and Display on the cmd prompt

//Simple copy one file to another file and Display on the cmd prompt
import java.io.*;
class CopyDis
{
public static void main(String args[])throws IOException
{
int c;
try
{
FileReader fr=new FileReader("CopyDis.java");
FileWriter fw=new FileWriter("SimpleCopy.txt");
while((c=fr.read())!=-1)
{
fw.write(c);
System.out.print((char)c);
}
System.out.println("Copy Successfully");
fr.close();
fw.close();
}catch(Exception e)
{
System.out.println(e);
}
}
}
/*Output:-
*/