Search
 
SCRIPT & CODE EXAMPLE
 

JAVA

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();
    }       
}
Comment

PREVIOUS NEXT
Code Example
Java :: Exception in thread "main" java.lang.ArrayIndexOutOfBoundsException: Index 0 out of bounds for length 0 
Java :: validate list of objects in javax validation 
Java :: ejercicios de clases abstractas e interfaces en java 
Java :: lombok error unnamed 
Java :: viewresolver in spring boot 
Java :: Java Remove Elements 
Java :: how to switch between two stylesheets in javafx. 
Java :: how to use asynx task to make api connection java 
Java :: .throwFor in java 
Java :: public class ForLoop { public static void main(String[] args){ for(int i=1; i=n ;i++ ) System.out.println("i"); } } 
Java :: spring data rest id missing 
Java :: how to set up basic java workspace 
Java :: Sauvegarder une partie en cours dans un fichier texte java 
Java :: spinner android add underline like edittext 
Java :: What is accept() method in networking 
Java :: java datasource 
Java :: call method without creating object java 
Java :: spigot deal damage 
Java :: java.lang.noclassdeffounderror even though class is present 
Java :: android studio bring keyboard up 
Java :: tipe data c++ 
Java :: 710*12 
Java :: java how to assign alphabet letter a score 
Java :: do switch statement always run default java 
Java :: get number value of an output to another script java 
Java :: Merging 2 sorted arrays (edge cases2) 
Java :: ClassCastException Casting toArray() method 
Java :: why left+(right-left)/2 will not overflow? 
Java :: mock a service when the method returning void 
Java :: jsonStringToMap 
ADD CONTENT
Topic
Content
Source link
Name
9+6 =