This week's book giveaway is in the OCPJP forum. We're giving away four copies of OCA/OCP Java SE 7 Programmer I & II Study Guide and have Kathy Sierra & Bert Bates on-line! See this thread for details.
You cannot fit two characters: \' in a char literal, so you cannot use the replace() method that takes two chars.
If Java 1.1 doesn't have the replace() method that takes strings, then you'll have to program it yourself. Loop through the input string character by character, copy the characters to a StringBuffer, and when you encounter a ' in the input string, write \' to the StringBuffer. At the end call toString() on the StringBuffer to get the output string.