Check this out. He has some good examples.
How to loop a Map in Java
Type: Posts; User: Chris.Brown.SPE
Check this out. He has some good examples.
How to loop a Map in Java
If you are required to check if it contains the string before replacing it then you are doing it how you should. You could put all of your keywords and their replacements into a structure like a map...
Unless your program requires you to know that it had a keyword after the fact, it is typically just easier to call the replace with each keyword then the end result will be correct. If your...
Sounds like you're just trying to read in a String, loop through each operator and use the replace() method, then output the new string. Are we understanding correctly? Which part are you confused on?