-3

removed. [duplicate]

........ ..

Mike3355
  • 10,012
  • 20
  • 90
  • 167
  • 3
    *"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. – Zabuzard Jul 02 '18 at 16:36

1 Answers1

2

You need to assign to result of replaceAll to something: String something = str.replaceAll()

Sam Orozco
  • 1,278
  • 1
  • 12
  • 24