Hello, what I want to do in Java is to read a text file (I already have a method how to read a file, so that's not the concern) and WHEN a certain word is read (such as D), I want to replace that character with a number "4". Can you provide some information as to how to achieve this? Possibly some sample code? Thanks in advance!
1. Read every line from file
2. Use String class. There are methods (replace, replaceAll, replaceFirst) Use these methods and replace what you need
You'll have to use regular expression