I am trying to replace a + character into a hyphen I have in my string.
+
hyphen
String str = \"word+word\"; str.replaceAll(\'+ \', \'-\');
`replaceAll´ is for regular expressions and strings are immutable. Use:
str = str.replace("+", "-");
instead...