Hi,
I've written some code (below). The program reads information from a file called “input.txt” and writes it to the terminal window. I want to the modify the program so that every full stop ‘.’ that is contained in “input.txt” is converted to an exclamation mark ‘!’ when the text is printed to the terminal window.

import java.io.IOException;
import java.io.FileReader;
/**
* Tests the result of trying to write to a file Reader.
* Also tests the result of trying to write to a random-access file
* that is opened only for reading.
*/

public class OptionA
{
public static void main(String[] args)
{
try
{
FileReader reader = new FileReader("input.txt");
int next;
char c;
boolean done = false;
while(!done)
{
next = reader.read();
if (next == -1) done = true;
else
{
c = (char)next;
System.out.print(c);
}
}
reader.close();
}
catch (IOException exception)
{
System.out.println("Error in processing file: " + exception);
}
}
}