I want to do search and replace with the help of java.
I have TreeMap that contains file names and its contents. I have one another TreeMap that contains word and its meaning.
I want to search file contents and replace found word with its meaning.
Thanks
P.S: It is not an assignment. I used simple reading file and replace function. However, I need speedy way to do it. Any sample code or ref. will be appreciated.
This example will work for all classes implementing the map interface, not just a TreeMap: