There is a text contaning the following data named "abc.txt".
a b c d e f g h i
j k l m n o p q r
s t u v w x y z
Now I want to change the "n" to "N" in the text file abc.text
I find the position of "n" using the following code.
try {
FileReader readIt = new FileReader("C://abc.txt");
BufferedReader collectData = null;
collectData = new BufferedReader (readIt);
String line= null;
while ((line= collectData.readLine ()) != null) {
if (line.indexOf ('n') > 0) {
/*
Over Here I want to write the code which can change
the letter "n" to letter "N"
*/
} // if
} // while
}catch (Exception ee) {System.out.println (ee);}