I have a java string with \" \" from a text file the program accesses with a Buffered Reader object. I have tried string.replaceAll(\"
\" \"
string.replaceAll(\"
Strings in Java are immutable. You have to do:
String
String newStr = cleaned.replaceAll(" ", "");