I am trying to figure out how to use character wrapping to mutate a string based on user input. If string is \'Bob loves to build building\' and user enters \'b\' I have to mak
Check replace method:
public String replace(char oldChar, char newChar)
Returns a new string resulting from replacing all occurrences of oldChar in this string with newChar.
For more details see [String#replace](http://docs.oracle.com/javase/6/docs/api/java/lang/String.html#replace(char, char))
EDIT:
class ReplaceDemo
{
public static void main(String[] args)
{
String inputString = "It is that, that's it.";
Char replaceMe = 'i';
Char replaceWith = 't';
String newString = inputString.Replace(replaceMe.toUpperCase(), replaceWith);
newString = newString.Replace(replaceMe.toLowerCase(), replaceWith);
}
}
Does that solve your problem?