Answers for "filterreader converts a string to uppercase java"

0

filterreader converts a string to uppercase java

import java.io.*;

public class TextFile {
    public static void main (String[] args) throws IOException {
        File file1 = new File("intext.txt");
        File file2 = new File("outtext.txt"); 
        char CharCounter = 0;       
        BufferedReader in = (new BufferedReader(newFileReader(file1)));
        PrintWriter out = (new PrintWriter(new FileWriter(file2)));
        int ch;
        while ((ch = in.read()) != -1){
            if (Character.isUpperCase(ch)){
                Character.toLowerCase(ch);

            }
            out.write(ch);
        }
        in.close();
        out.close();
    }       
}
Posted by: Guest on May-19-2020

Code answers related to "filterreader converts a string to uppercase java"

Code answers related to "Java"

Java Answers by Framework

Browse Popular Code Answers by Language