the replaceAll statement dont work.
It's a common mistake to forget, that Strings are final in Java.
If you say:
String s = "A great example";
s.replaceAll (" ", "#"

;
S.o.p (s);
s in still the same.
If you have read the documentation carefully, you would have seen, that s.replaceAll (a,b) RETURNS a String, in which all a are replaced with b.
It doesn't affect s itself.
But if you assign that result to s again:
s = s.replaceAll (a, b);
S.o.p (s);
you will get the intendet result.
'replaceAll statement dont work' is a kind of 'select is broken'-Pattern, see: pragmatic programmer, d.thomas, a.hunt.