by Dinesh Thakur

 

import java.io.*;

class ConvertingEachCharacter
{
                public static void main(String args[]) throws IOException
               {
                        BufferedReader k=new BufferedReader(new FileReader(args[0]));
                        PrintWriter h=new PrintWriter(new FileWriter(args[1],true));
                        String i;
                        FileReader fp;
                        FileReader fq;
                        try
                          {
                            fp=new FileReader(args[0]);
                          }
                             catch(FileNotFoundException e)
                                  {
                                     System.out.println("File cannot be found");
                                     return;
                                  }
                                      try
                                        {
                                           fq=new FileReader(args[1]);
                                        }
                                           catch(IOException e1)
                                                 {
                                                    System.out.println("File cannot be created");
                                                    return;
                                                 }
                                                    i=k.readLine();
                                                    while(i !=null)
                                                            {
                                                                 i=i.toUpperCase();
                                                                 h.println(i);
                                                                 System.out.println(i);
                                                                 i=k.readLine();
                                                             };
                                                                fp.close();
                                                                h.close();
               }
}

Copying Contents after Converting Each Character in Capital