help me

help me

Write a program that reads a file and create a file with contents lower case

import java.io.*;

public class InputOutput
{

public static void main(String[] args) throws FileNotFoundException, IOException
 {
    File file1 = new File("inputfile.txt");
    File file2 = new File("outputfile.txt");
    BufferedReader in = (new BufferedReader(new FileReader(file1)));
    PrintWriter out = (new PrintWriter(new FileWriter(file2)));

    int ch;
    while ((ch = in.read()) != -1) 
	{
        if (Character.isUpperCase(ch)) 
	{
            ch = Character.toLowerCase(ch);
        }
        out.write(ch);
    }

    in.close();
    out.close();

have created a program but it will not compile or execute. Could someone fix the program?

"You need a similar assignment done from scratch? Our qualified writers will help you with a guaranteed AI-free & plagiarism-free A+ quality paper, Confidentiality, Timely delivery & Livechat/phone Support.


Discount Code: CIPD30



Click ORDER NOW..

order custom paper