*"I am aware Strings are immutable"* - Yet you write code that assumes it would be mutable. Maybe you should reread what immutable means to strings and the string-manipulation methods.
– ZabuzardJul 02 '18 at 16:36
1 Answers1
2
You need to assign to result of replaceAll to something:
String something = str.replaceAll()