To copy the content one file into the another file while copying change the case of alphabet and replase all Digit by '*'.

/*To copy the content one file into the another file
while copying change the case of alphabet
and replase all Digit by '*'.
*/
import java.io.*;
class Slip2
{
public static void main(String args[])throws IOException
{
int c;
try
{
FileReader fr=new FileReader("a.txt");
FileWriter fw=new FileWriter("b.txt");
while((c=fr.read())!=-1)
{
if(c>=65&&c<=90)
{
c=c+32;
fw.write(c);
}
else if(c>=97&&c<=122)
{
c=c-32;
fw.write(c);
}
else if(c>=48&&c<=57)
{
fw.write('*');
}
else
{
fw.write(c);
}

}
System.out.println("Copy Successfully");
fr.close();
fw.close();
}catch(Exception e)
{
System.out.println(e);
}
}
}
/*Output:-
a.txtfile
Shinde Sachin 9767@gmail.com
1234R

D:\javapro\file>javac Slip2.java

D:\javapro\file>java Slip2
Copy Successfully

D:\javapro\file>
b.txt
sHINDE sACHIN ****@GMAIL.COM
****r
*/