This is so hard....
Hi,
The following question is so hard for me. I don't know how to start. Could anyone give me some hints?
(c) Write a method called replaceString that takes three Strings as parameters and returns
a String as output. For the purpose of this explanation, we will call the first parameter
a, the second b, and the third c, but you are free to choose your own names for the
parameters (though you must respect the order of the parameters in this description). The
method looks for occurrences of b in a, and replaces each occurrence of b with c. It is
important to note that b and c need not be the same length. The final String after all of
the replacements should be returned.
For example, if the first parameter is 揝he sells seashells by the sea shore? the second
parameter is 搒h? and the third parameter is 搒hm? the method should return the String
揝he sells seashmells by the sea shmore?
[963 byte] By [
Ace1a] at [2007-11-27 6:22:20]

Here's a hint:
[url=http://java.sun.com/j2se/1.5.0/docs/api/java/lang/String.html#replaceAll(java.lang.String,%20java.lang.String)]http://java.sun.com/j2se/1.5.0/docs/api/java/lang/String.html#replaceAll(java.lang.String,%20java.lang.String)[/url]
Edit:
Oh, good day, Hippolyte. Extra-caffeinated today, eh? :)
/me is glad we're not in a wild-west six-shooter duel.
My coffee is never far away. But by the timestamps, you had 5 minutes to beat me to a response!
And on a technical note, there is a simpler method than replaceAll, because the first argument to replaceAll is a regex string, which requires you to handle the case where you want to replace the literal substring "[ab]", for example.
> Same old same old. And you?
Doing well here, surviving the pollen from the Kansas corn fields. My horse had a blowout, had to take the wife's to work.
> The temperature got up to 34 癈 (93 癋) yesterday.
> Melted my igloo!
Yikes... I'll bet the sled dogs are pissed.