title: Replacing characters in a string based on mapping two sets of characters in Java
body: <p>I have edited two strings and can covert them to character maps. I am trying to think through the best way to map and replace based off of these two strings. For example: I have a word that I append to the front of the alphabet based on user input. In this example cat(catdefghijkl..). I then take a sentence and replace characters in it based on my new alphabet. (now a would be c, b would be a, c would be t). I am not looking for code but just input on the best way to accomplish this. Can you map two strings or character maps together and then do a replace based on those mappings?</p>