First you will need to use a
StreamReader
class to read the file. You will also need some way of identifiying where each paragraph ends. Once you have that then you can use the
String
class to split the paragraph into an array of words. That will allow you to find a specific item by index. You may need to code your own splitter method to allow for punctuation characters. You can then rebuild the paragraph from the array (after the change), and write it out to the new file. See
http://docs.oracle.com/javase/tutorial/essential/io/index.html[
^] for information on the stream I/O classes.