How to replace a character in a string in java?
String replace(char oldChar, char newChar): It replaces all the occurrences of a oldChar character with newChar character. For e.g. “pog pance”.replace(‘p’, ‘d’) would return dog dance.
🔗Source: stackoverflow.com
🔗Source: Java Interview Questions and Answers