This week's book giveaway is in the Agile and other Processes forum. We're giving away four copies of The Mikado Method and have Ola Ellnestam and Daniel Brolund on-line! See this thread for details.
To state it a little more explicitly, once a string is created, it CANNOT be changed. So what good are all those "replaceAll()" type methods???
simple. they RETURN a NEW string. so when you call
A.replaceAll(".","");
string A is not changed,, but a brand new string is created where the "." have been replaced with "". you need some new variable, say "String B", and then write this:
String B = A.replaceAll(".","");
A will still contain the original string, and B will be the string you want.
Never ascribe to malice that which can be adequately explained by stupidity.